[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
coreutils tests/Makefile.am assumes "make -C"
From: |
Paul Eggert |
Subject: |
coreutils tests/Makefile.am assumes "make -C" |
Date: |
Wed, 12 May 2004 00:16:12 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Solaris "make" doesn't have the -C option, but coreutils CVS uses it
in a couple of places; I noticed it with "make check". Here's a patch.
2004-05-12 Paul Eggert <address@hidden>
Don't assume that "make -C" works; Solaris "make" doesn't have -C.
* src/Makefile.am (all_programs.list): New rule, copied from
man/Makefile.am and tests/Makefile.am, except that we use the
system tr rather than ./tr and we don't use tr -s.
* tests/Makefile.am (all_programs): Use it.
* man/Makefile.am (all_programs): Likewise. Renamed from programs,
for consistency. All uses changed.
Index: src/Makefile.am
===================================================================
RCS file: /home/meyering/coreutils/cu/src/Makefile.am,v
retrieving revision 1.38
diff -p -u -r1.38 Makefile.am
--- src/Makefile.am 27 Apr 2004 17:03:58 -0000 1.38
+++ src/Makefile.am 12 May 2004 06:25:16 -0000
@@ -209,15 +209,18 @@ fs.h: stat.c extract-magic
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
+# Sort in traditional ASCII order, regardless of the current locale;
+# otherwise we may get into trouble with distinct strings that the
+# current locale considers to be equal.
+ASSORT = LC_ALL=C sort
+
all_programs = \
$(bin_PROGRAMS) \
$(bin_SCRIPTS) \
$(EXTRA_PROGRAMS)
-# Sort in traditional ASCII order, regardless of the current locale;
-# otherwise we may get into trouble with distinct strings that the
-# current locale considers to be equal.
-ASSORT = LC_ALL=C sort
+all_programs.list:
+ @echo $(all_programs) | tr ' ' '\n' | $(ASSORT)
pm = progs-makefile
pr = progs-readme
Index: tests/Makefile.am
===================================================================
RCS file: /home/meyering/coreutils/cu/tests/Makefile.am,v
retrieving revision 1.15
diff -p -u -r1.15 Makefile.am
--- tests/Makefile.am 8 Jan 2004 14:19:55 -0000 1.15
+++ tests/Makefile.am 12 May 2004 06:25:37 -0000
@@ -5,10 +5,7 @@
# current locale considers to be equal.
ASSORT = LC_ALL=C sort
-all_programs = \
- echo 'spy:;@echo $$(all_programs)' \
- | MAKEFLAGS= $(MAKE) -s -C ../src -f Makefile -f - spy \
- | ../src/tr -s ' ' '\n' | $(ASSORT) -u
+all_programs = (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list)
TESTS = help-version
TESTS_ENVIRONMENT = \
Index: man/Makefile.am
===================================================================
RCS file: /home/meyering/coreutils/cu/man/Makefile.am,v
retrieving revision 1.33
diff -p -u -r1.33 Makefile.am
--- man/Makefile.am 20 Apr 2004 10:04:11 -0000 1.33
+++ man/Makefile.am 12 May 2004 06:26:33 -0000
@@ -154,15 +154,14 @@ check-x-vs-1:
| $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
-programs = \
- echo 'spy:;@echo $$(all_programs)' \
- | MAKEFLAGS= $(MAKE) -s -C ../src -f Makefile -f - spy \
- | ../src/tr -s ' ' '\n' | $(ASSORT) -u | grep -v '\['
+all_programs = \
+ (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
+ | grep -v '\['
.PHONY: check-programs-vs-x
check-programs-vs-x:
status=0; \
- for p in dummy `$(programs)`; do \
+ for p in dummy `$(all_programs)`; do \
test $$p = dummy && continue; \
test $$p = ginstall && p=install || : ; \
test -f $(srcdir)/$$p.x \