summaryrefslogtreecommitdiff
path: root/tests/suffix12.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/suffix12.test')
-rwxr-xr-xtests/suffix12.test23
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/suffix12.test b/tests/suffix12.test
index 21089a549..a515f41bd 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
@@ -19,8 +20,6 @@
. ./defs || Exit 1
-set -e
-
cat >>configure.in <<EOF
AC_PROG_CC
AC_OUTPUT
@@ -31,14 +30,17 @@ AUTOMAKE_OPTIONS = subdir-objects
SUFFIXES = .baz .o
# we fake here:
.baz.o:
- cp $< $@
+ ## account for VPATH issues on weaker make implementations
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
bin_PROGRAMS = foo
foo_SOURCES = foo.c sub/bar.baz
-.PHONY: print
-print:
- @echo BEGIN: $(foo_OBJECTS) :END
+.PHONY: test-fake test-real
+test-fake:
+ echo $(foo_OBJECTS) | grep '^foo\.quux sub/bar\.quux$$'
+test-real:
+ echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT) sub/bar\.$(OBJEXT)$$'
END
mkdir sub
@@ -48,9 +50,10 @@ mkdir sub
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure
-OBJEXT=OBJ $MAKE -e print >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEGIN: foo.OBJ sub/bar.OBJ :END' stdout
+
+OBJEXT=quux $MAKE -e test-fake
+$MAKE test-real
: