I made the following makefile, where .info and html files are
stored in docs/info and docs/html directories. Whilst single
file antares.pdf and antares.dvi are stored in directory docs.
Have included order-only prerequisite for directories with the
rules defined as shown. Would one rather do something different
for making the directories if they don't exist?
docdir = ${HOME}/Opfeld/hist/build/${btnver}/docs
infdir = ${HOME}/Opfeld/hist/build/${btnver}/docs/info
hmldir = ${HOME}/Opfeld/hist/build/${btnver}/docs/html
srcs = ${srcdir}/antares.texi
opts = --force --enable-encoding -I ${srcdir}
$(infdir)/antares.info: $(srcs) | $(infdir)
makeinfo $(opts) -o $@ $<
$(hmldir)/antares.html: $(srcs) | $(hmldir)
makeinfo $(opts) --html -o $@ $<
$(docdir)/antares.pdf: $(srcs) | $(docdir)
makeinfo $(opts) --pdf -o $@ $<
$(docdir)/antares.dvi: $(srcs) | $(docdir)
makeinfo $(opts) --dvi -o $@ $<
${infdir}: $(docdir)
${hmldir}: ${docdir}
${docdir} ${infdir} ${hmldir}:
mkdir -p $@