I am building documentation for a program in a build directory
$(docdir).  I want to remove the built files with customary 
methods.

What would need to be changed or improved for clean handling of
texinfo-generated docs? 

docdir = ${HOME}/Opfeld/hist/build/${btnver}/docs
infdir = ${HOME}/Opfeld/hist/build/${btnver}/docs/info
hmldir = ${HOME}/Opfeld/hist/build/${btnver}/docs/html

doc_targets = $(infdir)/antares.info \
              $(hmldir)/antares.html \
              $(docdir)/antares.pdf  \
              $(docdir)/antares.dvi

.PHONY: clean mostlyclean maintainer-clean distclean

# Remove generated docs only
clean:
        rm -f $(doc_targets)

## Lighter Clean: Docs and temp files (if any)
mostlyclean: clean
        rm -f *.tmp

## Aggressive: All derived files
maintainer-clean: distclean
        rm -f $(infdir)/*.info $(hmldir)/*.html $(docdir)/*.pdf $(docdir)/*.dvi

## Full Reset: Everything but config (if autoconf used)
distclean: clean
        $(RM) -r ${HOME}/Opfeld/hist/build/${btnver}/docs



Reply via email to