summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-28 19:48:56 +0100
committerJim Meyering <meyering@redhat.com>2012-01-31 13:22:01 +0100
commit91d25dd6060a86b5fef7da91a91e350c3f28fe27 (patch)
treeed95fcf81f3bada3846f31895e28ea862ec4a203 /man
parent08ca18e7c41b9bc7eeff617d1c7606f6a9ccc05d (diff)
downloadidutils-91d25dd6060a86b5fef7da91a91e350c3f28fe27.tar.gz
idutils-91d25dd6060a86b5fef7da91a91e350c3f28fe27.tar.bz2
idutils-91d25dd6060a86b5fef7da91a91e350c3f28fe27.zip
build: fix man-page-building and cross-check rules
* man/Makefile.am (defid.1): New dependency. (programs): Use both $(PROGRAMS) and $(SCRIPTS). (check-x-vs-1): Use tr, not fmt, for portability. Use AM_V_GEN. (programs): Likewise. (check-programs-vs-x): Use AM_V_GEN. Remove coreutils-specific code. (t, mapped_name): Remove definitions of unused variables. (.x.1): Remove obsolete comment. Use AM_V_GEN, not echo.
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am30
1 files changed, 10 insertions, 20 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index 14dca9d..a259f15 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -16,22 +16,13 @@ xtokid.1: $(common_dep) $(srcdir)/xtokid.x ../src/xtokid.c
aid.1: $(common_dep) $(srcdir)/aid.x ../src/lid.c
eid.1: $(common_dep) $(srcdir)/eid.x ../src/lid.c
gid.1: $(common_dep) $(srcdir)/gid.x ../src/lid.c
+defid.1: $(common_dep) $(srcdir)/defid.x ../src/lid.c
SUFFIXES = .x .1
-
-# Ensure that help2man runs the ../src/ginstall binary as
-# `install' when creating install.1.
-# Similarly, ensure that it uses the ../src/[ binary to create test.1.
-t = $*.td
-mapped_name = `echo $*|sed 's/install/ginstall/; s/test/[/'`
-
-# That is necessary to avoid failures for programs that are also shell built-in
-# functions like echo, false, printf, pwd.
.x.1:
- @echo "Updating man page $@"; \
- PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
- $(HELP2MAN) \
- --include=$(srcdir)/$*.x \
+ $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ $(HELP2MAN) \
+ --include=$(srcdir)/$*.x \
--output=$@ $*$(EXEEXT)
check-local: check-x-vs-1 check-programs-vs-x
@@ -45,22 +36,21 @@ ASSORT = LC_ALL=C sort
# corresponding .1 file in the definition of $(dist_man1_MANS) above.
.PHONY: check-x-vs-1
check-x-vs-1:
- PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
+ $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
- echo $(dist_man1_MANS) | fmt -w 1 | sed 's/\.1$$//' | $(ASSORT) \
- | diff -u - $$t || { rm $$t; exit 1; }; \
+ echo $(dist_man1_MANS) | tr -s ' ' '\012' | sed 's/\.1$$//' \
+ | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
programs = \
- echo 'spy:;@echo $$(all_programs)' \
+ echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \
| MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \
- | fmt -1 | $(ASSORT) -u | grep -v '\['
+ | tr -s ' ' '\012' | $(ASSORT) -u
.PHONY: check-programs-vs-x
check-programs-vs-x:
- for p in `$(programs)`; do \
- test $$p = ginstall && p=install || : ; \
+ $(AM_V_GEN)for p in `$(programs)`; do \
test -f $(srcdir)/$$p.x \
|| { echo missing $$p.x 1>&2; missing=1; }; \
done; \