From: Peter Rosin Date: Wed, 29 Feb 2012 19:21:30 +0000 (+0100) Subject: tests: do not try to use ar(1) when $AR points to something else X-Git-Tag: v1.11b~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=525f16c3a5b0d3141bcd92c5b9d7d715f9feffde;p=platform%2Fupstream%2Fautomake.git tests: do not try to use ar(1) when $AR points to something else * tests/libobj10.test: Move the archive listing commands to the Makefile, so that $AR - as determined by configure - can be used. * tests/libobj17.test: Likewise. --- diff --git a/tests/libobj10.test b/tests/libobj10.test index a566b09..f19de74 100755 --- a/tests/libobj10.test +++ b/tests/libobj10.test @@ -36,6 +36,9 @@ BUILT_SOURCES = foo.c CLEANFILES = foo.c foo.c: echo 'extern int dummy;' > $@ +.PHONY: debugging +debugging: + $(AR) t libfoo.a END cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'" @@ -47,7 +50,7 @@ $AUTOMAKE ./configure $MAKE -ar t libfoo.a # For debugging. +$MAKE debugging $MAKE distcheck : diff --git a/tests/libobj17.test b/tests/libobj17.test index 0ced8d9..6c54a28 100755 --- a/tests/libobj17.test +++ b/tests/libobj17.test @@ -33,6 +33,13 @@ cat > Makefile.am << 'END' noinst_LIBRARIES = libtu.a libtu_a_SOURCES = libtu_a_LIBADD = $(LIBOBJS) +.PHONY: check-quux check-zardoz +check-quux: + $(AR) t libtu.a | grep quux + $(AR) t libtu.a | grep zardoz && exit 1; exit 0 +check-zardoz: + $(AR) t libtu.a | grep zardoz + $(AR) t libtu.a | grep quux && exit 1; exit 0 END cat > quux.c <<'END' @@ -52,8 +59,7 @@ $AUTOCONF $MAKE ls -l # For debugging. test -f libtu.a -ar t libtu.a | $FGREP quux -ar t libtu.a | $FGREP zardoz && Exit 1 +$MAKE check-quux $MAKE distclean @@ -61,7 +67,6 @@ $MAKE distclean $MAKE ls -l # For debugging. test -f libtu.a -ar t libtu.a | $FGREP zardoz -ar t libtu.a | $FGREP quux && Exit 1 +$MAKE check-zardoz :