Quoting from: http://autobuild.josefsson.org/automake/log-201101181921603831000.txt
parallel-tests8: | + make check | make foo.test | cp `test -f ../foo.in || echo ../`foo.in foo.test | cp: cannot access foo.in | *** Error code 2 | make: Fatal error: Command failed for target `foo.test' | Current working directory /tmp/am/build-sparc-sun-solaris2.6/tests/parallel-tests8.dir/build This is due to the issue described in info Autoconf "Automatic Rule Rewriting" and can be worked around by not surrounding the text in question with whitespace on both sides (which makes the thing a "plain word") in the lingo of said autoconf.texi section. The patch below is against master. Does anybody know of an efficient way I can use to find out with git which branches I need to apply (parts of) it to? Thanks, Ralf tests: fix VPATH auto-expansion workarounds. * tests/parallel-tests8.test, tests/suffix10.test, tests/suffix11.test, tests/suffix12.test, tests/suffix13.test, tests/suffix3.test, tests/suffix5.test, tests/suffix8.test: Ensure $< is not surrounded by white space, to prevent Solaris make from applying automatic VPATH text expansion. diff --git a/tests/parallel-tests8.test b/tests/parallel-tests8.test index 302125f..d1d5b74 100755 --- a/tests/parallel-tests8.test +++ b/tests/parallel-tests8.test @@ -37,7 +37,7 @@ TESTS = foo.test 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)/`$< $@ + cp `test -f '$<' || echo $(srcdir)/`$< $@ chmod +x $@ check_SCRIPTS = $(TESTS) EXTRA_DIST = foo.in foo.test diff --git a/tests/suffix10.test b/tests/suffix10.test index 8160a8d..026da24 100755 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@ -42,7 +42,7 @@ libfoo_la_SOURCES = foo.x_ && echo 'WORD: "foo";' \ && echo '%%' \ ## account for VPATH issues on weaker make implementations - && cat `test -f $< || echo $(srcdir)/`$<; \ + && cat `test -f '$<' || echo $(srcdir)/`$<; \ } > $@-t mv -f $@-t $@ .PHONY: test diff --git a/tests/suffix11.test b/tests/suffix11.test index eac61f4..daeba1c 100755 --- a/tests/suffix11.test +++ b/tests/suffix11.test @@ -33,7 +33,7 @@ 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' `test -f '$<' || echo $(srcdir)/`$< >$@ CLEANFILES = foo.c bar.c baz1.c baz2.c diff --git a/tests/suffix12.test b/tests/suffix12.test index 6628d31..a515f41 100755 --- a/tests/suffix12.test +++ b/tests/suffix12.test @@ -31,7 +31,7 @@ SUFFIXES = .baz .o # we fake here: .baz.o: ## account for VPATH issues on weaker make implementations - cp `test -f $< || echo $(srcdir)/`$< $@ + cp `test -f '$<' || echo $(srcdir)/`$< $@ bin_PROGRAMS = foo foo_SOURCES = foo.c sub/bar.baz diff --git a/tests/suffix13.test b/tests/suffix13.test index c81692c..228d04a 100755 --- a/tests/suffix13.test +++ b/tests/suffix13.test @@ -37,7 +37,7 @@ 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 `test -f '$<' || echo $(srcdir)/`$< $@ DISTCLEANFILES = sub/bar.c diff --git a/tests/suffix3.test b/tests/suffix3.test index 060cc49..e0c01f6 100755 --- a/tests/suffix3.test +++ b/tests/suffix3.test @@ -27,7 +27,7 @@ END cat > Makefile.am << 'END' SUFFIXES = .zoo .zoo.cc: - sed 's/INTEGER/int/g' `test -f $< || echo $(srcdir)/`$< >$@ + sed 's/INTEGER/int/g' `test -f '$<' || echo $(srcdir)/`$< >$@ 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 68de440..60417e4 100755 --- a/tests/suffix5.test +++ b/tests/suffix5.test @@ -30,7 +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 `test -f '$<' || echo $(srcdir)/`$<) > $@ noinst_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.k diff --git a/tests/suffix8.test b/tests/suffix8.test index 33cf331..921c641 100755 --- a/tests/suffix8.test +++ b/tests/suffix8.test @@ -41,13 +41,13 @@ 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 `test -f '$<' || echo $(srcdir)/`$< $@ .y_.o: - cp `test -f $< || echo $(srcdir)/`$< $@ + cp `test -f '$<' || echo $(srcdir)/`$< $@ .y_.z_: - cp `test -f $< || echo $(srcdir)/`$< $@ + cp `test -f '$<' || echo $(srcdir)/`$< $@ .z_.lo: - cp `test -f $< || echo $(srcdir)/`$< $@ + cp `test -f '$<' || echo $(srcdir)/`$< $@ # Some make implementations don't remove intermediate files # automatically, thus causing "make distcheck" to fail if