Clean handling of texinfo-generated docs

Heime <[email protected]> Fri, 01 May 2026 19:08:46 +0000
Newsgroups gmane.comp.gnu.make.general
Message-ID <IvMBI8JbpgUHMa-j_cGyBxDGof60_F8I_iLfWrrwbWUIY96HwmcAsqLtMK7k7teakGJT6JM3MhlIz0MtsusgkBjLT6IA7xbnmksU-L5_fIM=@protonmail.com>
I am building documentation for a program in a build directory
$(docdir).  I want to remove the built files with customary=20
methods.

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

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

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

.PHONY: clean mostlyclean maintainer-clean distclean

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

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

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

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