summaryrefslogtreecommitdiff
path: root/cfg.mk
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-09-01 01:46:48 +0200
committerJim Meyering <meyering@redhat.com>2012-09-01 21:28:12 +0200
commit59da6f1e6fb5701fe2a78ebe4a7841d0d1b3ef7a (patch)
treea1b0b25c5f0eaaebc87e36d6f607f7e38914e278 /cfg.mk
parent380d9da0b01c86aa11a7e83279fe7baebed6aad7 (diff)
downloadcoreutils-59da6f1e6fb5701fe2a78ebe4a7841d0d1b3ef7a.tar.xz
build: simplify and make more portable to non-GNU make
The AC_SUBST'd variable '$(NO_INSTALL_PROGS_DEFAULT)' is only used in makefile expressions expanding the list of manual pages that are not built by default (but might need to be when a distribution tarball is created). Such expressions exploited a feature of make variable expansion -- namely, $(VAR:%=dir/%.x) -- that, while seemingly quite portable in practice, is not POSIX-conforming, and could break on lesser vendor make implementations. So kill two birds with one stone, by getting rid of the $(NO_INSTALL_PROGS_DEFAULT) intermediate variable and improving makefile portability in the process. While at it, we also clean up some other minor naming inconsistency and useless indirection. * configure.ac (NO_INSTALL_PROGS_DEFAULT): Don't define or AC_SUBST anymore; instead ... (EXTRA_MANS): ... define and AC_SUBST these. * man/local.mk (extra_man_1): Rename ... (EXTRA_MANS): ... like this, explicitly making clear it's AC_SUBST'd. (extra_man_x): It's used only once, no need to define it; just inline its only expansion where needed. (EXTRA_DIST): Adjust. (ALL_MANS): New, union of $(EXTRA_MANS) and $(dist_man1_MANS). * cfg.mk (check-x-vs-1, sc_option_desc_uppercase): Rely on $(ALL_MANS) rather than on $(NO_INSTALL_PROGS_DEFAULT) and $(dist_man1_MANS).
Diffstat (limited to 'cfg.mk')
-rw-r--r--cfg.mk7
1 files changed, 2 insertions, 5 deletions
diff --git a/cfg.mk b/cfg.mk
index 780e6a897..2323fa3f2 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -198,11 +198,9 @@ sc_long_lines:
# One could grep source directly as follows:
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
# but that would miss descriptions not on the same line as the -option.
-sc_option_desc_uppercase:
+sc_option_desc_uppercase: $(ALL_MANS)
@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' \
&& { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
-sc_option_desc_uppercase: $(dist_man1_MANS) \
- $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT))
# Ensure all man/*.[1x] files are present.
sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
@@ -217,8 +215,7 @@ check-x-vs-1:
t=$@-t; \
(cd $(srcdir)/man && ls -1 *.x) \
| sed 's/\.x$$//' | $(ASSORT) > $$t; \
- (echo $(patsubst man/%,%,$(dist_man1_MANS)) \
- $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(patsubst man/%,%,$(ALL_MANS)) \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t