coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/7] build: some refactorings in cfg.mk


From: Stefano Lattarini
Subject: [PATCH 2/7] build: some refactorings in cfg.mk
Date: Thu, 30 Aug 2012 18:19:53 +0200

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.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 cfg.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 35f1071..b5f4174 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -207,16 +207,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                   \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]