build: Generate programs' man pages in the source directory, per GCS

* man/Makefile.am ($(dist_man1_MANS)): Generate the *.1 files in
$(srcdir), not in the build dir.
This commit is contained in:
Bruno Haible 2024-07-21 21:22:28 +02:00 committed by Jim Meyering
parent 5ec3ebf31c
commit 7f9bf95640

View File

@ -34,7 +34,8 @@ $(dist_man1_MANS): $(SRC_VERSION_C) help2man
$(AM_V_GEN)base=`expr $@ : '\(.*\).1'` \
&& test -x $(bin_dir)/$$base \
&& (echo '[NAME]' \
&& sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c) \
&& sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c) \
| PATH="$(bin_dir)$(PATH_SEPARATOR)$$PATH" \
$(srcdir)/help2man -i - -i $(srcdir)/$$base.x \
-S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@
-S '$(PACKAGE) $(VERSION)' $$base > $$base.1-t \
&& mv $$base.1-t $(srcdir)/$$base.1