How can I install a directory tree of HTML files, stylesheets and images with automake without having to create Makefiles in each subdirectory?
Using the following in the toplevel directory
htmldir = $(docdir)/foo/html
html_DATA = \
stylesheets/foo.css \
images/foo.jpg \
index.html \
about/index.html \
faq/index.html
EXTRA_DIST = $(html_DATA)
fails because the subdirectories are not created before install
is called.
You could write
htmldir
is a variable the user is entitled to modify usingconfigure --htmldir=...
so I suggest using another one if you want to write to some subdirectory of it. Thenobase_
prefix will tell Automake not to strip leading directories during installation, and thedist_
prefix requires the files to be distributed.