automake-ng
[Top][All Lists]
Advanced

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

[Automake-ng] [PATCH 5/5] [ng] tests: GNU make doesn't perform VPATH rew


From: Stefano Lattarini
Subject: [Automake-ng] [PATCH 5/5] [ng] tests: GNU make doesn't perform VPATH rewrites
Date: Sat, 17 Dec 2011 11:51:37 +0100

* tests/parallel-tests8.test: Remove extra hacks that accounted
for the possibility of VPATH rewrites, since GNU make performs
none.
* tests/suffix10.tap: Likewise.
* tests/suffix11.tap: Likewise.
* tests/suffix12.test: Likewise.
* tests/suffix13.test: Likewise.
* tests/suffix3.tap: Likewise.
* tests/suffix5.test: Likewise.
* tests/suffix8.tap: Likewise.
* tests/java-compile-run-flat.test: Likewise, and simplify by
assuming that the special make variable `$<' is available also
in common rules, not only in suffix rules.
* tests/java-compile-run-nested.test: Likewise.
---
 ChangeLog                          |   18 ++++++++++++++++++
 tests/java-compile-run-flat.test   |    2 +-
 tests/java-compile-run-nested.test |    2 +-
 tests/parallel-tests8.test         |    4 +---
 tests/suffix10.tap                 |    3 +--
 tests/suffix11.tap                 |    3 +--
 tests/suffix12.test                |    3 +--
 tests/suffix13.test                |    3 +--
 tests/suffix3.tap                  |    2 +-
 tests/suffix5.test                 |    3 +--
 tests/suffix8.tap                  |   10 ++++------
 11 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4c9aae7..d55d5f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2011-12-15  Stefano Lattarini  <address@hidden>
 
+       [ng] tests: GNU make doesn't perform VPATH rewrites
+       * tests/parallel-tests8.test: Remove extra hacks that accounted
+       for the possibility of VPATH rewrites, since GNU make performs
+       none.
+       * tests/suffix10.tap: Likewise.
+       * tests/suffix11.tap: Likewise.
+       * tests/suffix12.test: Likewise.
+       * tests/suffix13.test: Likewise.
+       * tests/suffix3.tap: Likewise.
+       * tests/suffix5.test: Likewise.
+       * tests/suffix8.tap: Likewise.
+       * tests/java-compile-run-flat.test: Likewise, and simplify by
+       assuming that the special make variable `$<' is available also
+       in common rules, not only in suffix rules.
+       * tests/java-compile-run-nested.test: Likewise.
+
+2011-12-15  Stefano Lattarini  <address@hidden>
+
        [ng] test defs: don't unset variables not influential on GNU make
        * tests/defs (__MKLVL__): Don't unset, it was influential only
        for BSD make, not GNU make.
diff --git a/tests/java-compile-run-flat.test b/tests/java-compile-run-flat.test
index 3e2bcfd..b7e414a 100755
--- a/tests/java-compile-run-flat.test
+++ b/tests/java-compile-run-flat.test
@@ -81,7 +81,7 @@ edit_script = sed -e 's|address@hidden@|$(JAVA)|g' \
 
 jprog: jprog.sh
        rm -f $@ address@hidden
-       $(edit_script) `test -f 'address@hidden' || echo 
$(srcdir)/address@hidden >address@hidden
+       $(edit_script) $< >address@hidden
        chmod a-w address@hidden && chmod a+x address@hidden && mv -f 
address@hidden $@
        sed 's/^/ | /' $@ ;: for debugging.
 
diff --git a/tests/java-compile-run-nested.test 
b/tests/java-compile-run-nested.test
index dbdf4a1..4d350eb 100755
--- a/tests/java-compile-run-nested.test
+++ b/tests/java-compile-run-nested.test
@@ -87,7 +87,7 @@ edit_script = sed -e 's|address@hidden@|$(JAVA)|g' \
 
 jprog: jprog.sh
        rm -f $@ address@hidden
-       $(edit_script) `test -f 'address@hidden' || echo 
$(srcdir)/address@hidden >address@hidden
+       $(edit_script) $< >address@hidden
        chmod a-w address@hidden && chmod a+x address@hidden && mv -f 
address@hidden $@
        sed 's/^/ | /' $@ ;: for debugging.
 
diff --git a/tests/parallel-tests8.test b/tests/parallel-tests8.test
index 560f9d4..d3e6f81 100755
--- a/tests/parallel-tests8.test
+++ b/tests/parallel-tests8.test
@@ -36,9 +36,7 @@ TESTS = foo.test
 ## the next line will cause automake to error out:
 TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
 .in.test:
-## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
-       chmod +x $@
+       cp $< $@ && chmod +x $@
 check_SCRIPTS = $(TESTS)
 EXTRA_DIST = foo.in foo.test
 DISTCLEANFILES = foo.test
diff --git a/tests/suffix10.tap b/tests/suffix10.tap
index 65f77ae..8222913 100755
--- a/tests/suffix10.tap
+++ b/tests/suffix10.tap
@@ -44,8 +44,7 @@ libfoo_la_SOURCES = foo.x_
          && echo '%%' \
          && echo 'WORD: "foo";' \
          && echo '%%' \
-## Account for VPATH issues on weaker make implementations.
-         && cat `test -f '$<' || echo $(srcdir)/`$<; \
+         && cat $<; \
        } > address@hidden
        mv -f address@hidden $@
 .PHONY: test
diff --git a/tests/suffix11.tap b/tests/suffix11.tap
index 9843e73..36bb086 100755
--- a/tests/suffix11.tap
+++ b/tests/suffix11.tap
@@ -35,8 +35,7 @@ bar_SOURCES = bar.y-z
 baz_SOURCES = baz1.x_ baz2.y-z
 
 .y-z.c .x_.c:
-## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5).
-       sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@
+       sed 's/INTEGER/int/g' $< >$@
 
 CLEANFILES = foo.c bar.c baz1.c baz2.c
 
diff --git a/tests/suffix12.test b/tests/suffix12.test
index 430a350..4244bc2 100755
--- a/tests/suffix12.test
+++ b/tests/suffix12.test
@@ -31,8 +31,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 SUFFIXES = .baz .o
 # We fake here:
 .baz.o:
-## Account for VPATH issues on weaker make implementations.
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 
 bin_PROGRAMS = foo
 foo_SOURCES = foo.c sub/bar.baz
diff --git a/tests/suffix13.test b/tests/suffix13.test
index 756d83e..a6aafb6 100755
--- a/tests/suffix13.test
+++ b/tests/suffix13.test
@@ -37,8 +37,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 SUFFIXES = .baz .c
 .baz.c:
        case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
-## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5).
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 
 DISTCLEANFILES = sub/bar.c
 
diff --git a/tests/suffix3.tap b/tests/suffix3.tap
index c5f1300..e494159 100755
--- a/tests/suffix3.tap
+++ b/tests/suffix3.tap
@@ -30,7 +30,7 @@ END
 cat > Makefile.am << 'END'
 SUFFIXES = .zoo
 .zoo.cc:
-       sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@
+       sed 's/INTEGER/int/g' $< >$@
 bin_PROGRAMS = foo
 foo_SOURCES = foo.zoo
 # This is required by "make distcheck".  The useless indirection is
diff --git a/tests/suffix5.test b/tests/suffix5.test
index fcde0b6..995db31 100755
--- a/tests/suffix5.test
+++ b/tests/suffix5.test
@@ -30,8 +30,7 @@ END
 
 cat > Makefile.am << 'END'
 .k.lo:
-## Account for VPATH issues on weaker make implementations.
-       (echo $< && cat `test -f '$<' || echo $(srcdir)/`$<) > $@
+       (echo $< && cat $<) > $@
 
 noinst_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES = foo.k
diff --git a/tests/suffix8.tap b/tests/suffix8.tap
index 34f549e..b402f98 100755
--- a/tests/suffix8.tap
+++ b/tests/suffix8.tap
@@ -41,16 +41,14 @@ lib_LTLIBRARIES = libfoo.la
 foo_SOURCES = foo.x_
 libfoo_la_SOURCES = bar.x_
 
-# The elaborate cp commands below account for VPATH issues on
-# weaker make implementations (e.g. IRIX 6.5).
 .x_.y_:
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 .y_.o:
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 .y_.z_:
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 .z_.lo:
-       cp `test -f '$<' || echo $(srcdir)/`$< $@
+       cp $< $@
 
 # Some make implementations don't remove intermediate files
 # automatically, thus causing "make distcheck" to fail if
-- 
1.7.2.3




reply via email to

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