diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-08-30 18:19:53 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-08-31 12:22:09 +0200 |
commit | a159d594facba612e60d58539eeba80e2a0d3413 (patch) | |
tree | 4779e594a8a23909591f651d8a3ce6956d8cf0d0 | |
parent | a11502a98c999a1d6a75c6e2661b25c1bfd95cf6 (diff) | |
download | coreutils-a159d594facba612e60d58539eeba80e2a0d3413.tar.xz |
build: some refactorings in cfg.mk
Partly a minor cleanup, partly a preparation for future changes.
* Makefile.am (all_programs): Rename ...
(all-progs-but-lbracket): ... like this, and re-define it to expand
at make time rather than only at recipe time (i.e., using $(shell ...)
instead of `...`).
(check-programs-vs-x): Adjust.
-rw-r--r-- | cfg.mk | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -206,16 +206,17 @@ check-x-vs-1: | $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \ rm $$t -all_programs = \ - (cd ./src && MAKEFLAGS= $(MAKE) -s all_programs.list) \ - | grep -v '\[' +# Writing a portable rule to generate a manpage like '[.1' would be +# a nightmare. +all-progs-but-lbracket = $(filter-out [, $(shell \ + (cd ./src && MAKEFLAGS= ${MAKE} -s all_programs.list))) # Ensure that for each .x file in the 'man/' subdirectory, there is a # corresponding coreutils program. .PHONY: check-programs-vs-x check-programs-vs-x: all_programs @status=0; \ - for p in dummy `$(all_programs)`; do \ + for p in dummy $(all-progs-but-lbracket); do \ test $$p = dummy && continue; \ test $$p = ginstall && p=install || : ; \ test -f $(srcdir)/man/$$p.x \ |