From: Ralf Wildenhues Date: Sat, 22 Jan 2011 12:11:39 +0000 (+0100) Subject: tests: fix VPATH auto-expansion workarounds. X-Git-Tag: ng-0.5a~241^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e09e0b9105627b4a855a7df0d41e471ff4b7f6b9;p=thirdparty%2Fautomake.git tests: fix VPATH auto-expansion workarounds. * tests/suffix10.test, tests/suffix11.test, tests/suffix12.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. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 9d27843e9..85a38ad53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-01-22 Ralf Wildenhues + tests: fix VPATH auto-expansion workarounds. + * tests/suffix10.test, tests/suffix11.test, tests/suffix12.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. + tests: fix VPATH auto-expansion workarounds. * tests/parallel-tests8.test, tests/suffix13.test: Ensure $< is not surrounded by white space, to prevent Solaris diff --git a/tests/suffix10.test b/tests/suffix10.test index 0398d89d2..2d69cf222 100755 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,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 ec4f5a197..c98d9f6b7 100755 --- a/tests/suffix11.test +++ b/tests/suffix11.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,7 +35,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 40f7b3fdf..f579d5f31 100755 --- a/tests/suffix12.test +++ b/tests/suffix12.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2006, 2010, 2011 Free Software Foundation, +# Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +33,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/suffix3.test b/tests/suffix3.test index 0ec457ef4..93dbc868b 100755 --- a/tests/suffix3.test +++ b/tests/suffix3.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation, +# Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +29,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 f661620d8..7a9cc9840 100755 --- a/tests/suffix5.test +++ b/tests/suffix5.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,7 +32,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 8760d7bd2..db5732f01 100755 --- a/tests/suffix8.test +++ b/tests/suffix8.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -43,13 +43,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