Follow-up Comment #50, bug #66583 (group groff): [comment #44 comment #44:] > On Tue, Dec 31, 2024 at 07:24:03AM -0500, G. Branden Robinson wrote: >>> Also, the list of targets should be unconditional, and configure >>> shouldn't mess with them. Targets are make(1)'s business. But >>> usually, ./configure does change them significanty. >>> >>> It's [this] other part what I dislike. >> >> I trust you realize that you and onf are arguing diametrically opposed >> objectives here. He _absolutely_ wants to drive target selection from >> the "./configure" script. Or did. The plethora of new make(1) target >> names he's proposed, he might regard as a complete replacement for that >> approach. > > I do.
I would like to correct this. I don't want to drive target selection from ./configure, let alone "absolutely". The reason why my past patches have implemented it this way is that the automake way of doing things is defining weird make macros that get converted into targets and added as dependencies to all, and it took me a bit too long to realize it's possible even with this strange approach to do it the traditional make way. (To be honest, it wasn't until Alex's comments that I looked more into it and realized it's possible. Feel free to consider me slow.) "The plethora of new make(1) target names [I've] proposed" I regard as the idiomatic make way to allow building only the binaries, or only the docs. If anyone disagrees, I would like to hear your objections; so far I have not heard any opinions regarding this proposed approach. As for Alex's suspicion of a recursive build and Branden's objections, just look into the generated Makefile [re-arranged for clarity]: RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" BUILT_SOURCES = $(ALLOCA_H) $(ASSERT_H) $(ERRNO_H) $(FLOAT_H) \ $(GETOPT_H) $(GETOPT_CDEFS_H) lib/inttypes.h $(LIMITS_H) \ lib/math.h lib/pthread.h lib/sched.h $(STDBOOL_H) \ $(STDCKDINT_H) $(STDDEF_H) $(STDINT_H) lib/stdio.h \ lib/stdlib.h lib/string.h lib/sys/stat.h lib/sys/types.h \ lib/sys/wait.h lib/time.h lib/unistd.h \ $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) \ lib/wchar.h lib/wctype.h man defs.h $(top_srcdir)/.version all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive all: $(GROFF_INFO) $(GROFF_TXT) $(GROFF_HTML) $(GROFF_DVI) $(GROFF_PDF) all: font/devpdf/stamp all: charset.alias ref-add.sed ref-del.sed all: tmac/stamp-wrap all: generate_man_files check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive tags: tags-recursive ctags: ctags-recursive cscopelist: cscopelist-recursive installdirs: installdirs-recursive install-data: install-data-recursive uninstall: uninstall-recursive installcheck: installcheck-recursive distclean: distclean-recursive clean: clean-recursive dvi: dvi-recursive html: html-recursive info: info-recursive pdf: pdf-recursive ps: ps-recursive To sum it up: `make all` does what would be considered a recursive build: it runs `$(MAKE) $(AM_MAKEFLAGS) all-recursive`. As far as I can tell, the AM_MAKEFLAGS macro is not defined anywhere, so this make does not inherit flags the user called make with. This means that what Alex is experiencing is this: he runs `make -k [all]`, which runs `make all-recursive` (defined under `$(am__recursive_targets):`). The command `make all-recursive` fails due to the Texinfo manual not building, and does not try building other targets because it wasn't run with the flag -k. Because the dependencies of all do not include anything outside BUILT_SOURCES (which seems to contain stuff relevant to gnulib), the Texinfo manual, and some helper targets, there is nothing more the `make -k` can do and so exits. `grep -iw recursive $(find -name '*.a[cm]' -or -name '*.m4')` does not find anything substantial, so this is introduced by autotools. Web search does not reveal any official documentation on this matter, only a page at autotools.info (unofficial resource) entitled "Non-recursive Automake", but this only advises the use of a single Makefile.am that includes all the other *.am files without a single word about the auto-generated *-recursive make targets. Conclusion: automake introduces recursive make into the build process. I haven't found any documentation on how to disable this. If anyone has the patience to hear more about autotools, I suggest taking this up to the autotools mailing list. I for sure don't. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?66583> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
signature.asc
Description: PGP signature