"G. Branden Robinson" <[email protected]> writes:
> At 2026-01-17T10:39:05-0800, Collin Funk wrote: >> "G. Branden Robinson" <[email protected]> writes: >> > By happenstance I noticed the gnulib developers talking about how >> > they had a GNUMakefile target for generating code coverage reports >> > for you. >> > >> > In groff, we don't use GNUMakefiles--we try to use portable Make, >> > and have largely succeeded. If *BSD makes have gotten current with >> > POSIX 2024, they may even be able to run these targets. The most >> > exotic thing I see is the `?=` macro definition operator. >> >> The 'maintainer-makefile' module doesn't depend on GNU Make for >> building programs. It copies a "maint.mk' file with the code coverage >> rules, among other checks to the repository along with "GNUMakefile". >> The "GNUMakefile" is relatively small and includes three files, >> "Makefile", "cfg.mk", and "maint.mk"; in that order. >> >> The result is that using GNU Make you will have extra targets meant >> for maintainers. Users using another 'make' program will still be able >> to build the programs, without the targets meant for maintainers. > > Right, but I want any interested person (potential groff developer) in > possession of a release archive (or a Git checkout) to be able to run > the targets. It's up to them to satisfy maintainer-mode dependencies, > but I see no reason to erect further barriers to this sort of > investigation of the code. Fair enough. Though "maint.mk" mostly just uses Perl, Awk, Sed, etc. Things that will be installed on any machine by default besides maybe containers, but those are certainly at least transitive dependencies of groff. There are a few rules that use other programs, e.g. "codespell", but we check for those and skip them if they do not exist. > I'm leaning toward adding a "tags" target as well, to run "ctags -R" > over relevant portions of the tree. I've already been using "tags" > files to develop groff with Vim and my personal fork of "mg". I see no > reason not to help others do the same. Oh, I am so used to Automake making those rules for me. Does 'make TAGS' not work in groff for some reason? Copying some text from the Automake documentation [1]: All files listed using the _SOURCES, _HEADERS, and _LISP primaries will be used to generate tags. Generated source files that are not distributed must be declared in variables like nodist_noinst_HEADERS or nodist_prog_SOURCES or they will be ignored. I would check groff for myself, but I never learned how to use ctags. I like GNU global. :) Collin [1] https://www.gnu.org/software/automake/manual/automake.html#Tags
