test -f one$(EXEEXT)
test -f two$(EXEEXT)
touch ok
-.PHONY: print-tests
-print-tests:
- echo BEG: $(TESTS) :END
+expect-tests:
+ is $(TESTS) == one$(EXEEXT) two$(EXEEXT)
END
$ACLOCAL
./configure
$MAKE check
test -f ok
-run_make -O EXEEXT=.bin print-tests
-$FGREP 'BEG: one.bin two.bin :END' stdout
+run_make expect-tests
+run_make expect-tests EXEEXT=.bin
# No am__EXEEXT_* variable is needed.
grep '_EXEEXT_[1-9]' Makefile.in && exit 1
$FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in
check_SCRIPTS = b
EXTRA_DIST = $(check_SCRIPTS)
-.PHONY: print-xfail-tests
-print-xfail-tests:
- @echo BEG: $(XFAIL_TESTS) :END
+expect-xfail-tests:
+ is $(XFAIL_TESTS) == a$(EXEEXT) b c$(EXEEXT) d$(EXEEXT)
END
cat > b <<'END'
./configure
$MAKE check
-run_make -O EXEEXT=.bin print-xfail-tests
-$FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
+run_make expect-xfail-tests
+run_make expect-xfail-tests EXEEXT=.bin
$MAKE distcheck
END
cat > Makefile.am << 'END'
-## Use a different dir for each to make grep easy.
bin_PROGRAMS = maude
sbin_PROGRAMS = maude.static
## We don't define this one for now. Probably it is an error.
libexec_PROGRAMS = rmt
endif
-print:
- @echo 1BEG: $(bin_PROGRAMS) :END1
- @echo 2BEG: $(sbin_PROGRAMS) :END2
- @echo 3BEG: $(check_PROGRAMS) :END3
- @echo 4BEG: $(libexec_PROGRAMS) :END4
+test-default:
+ is $(bin_PROGRAMS) == maude$(EXEEXT) mt$(EXEEXT)
+ is $(sbin_PROGRAMS) == maude.static$(EXEEXT)
+ is $(check_PROGRAMS) == maude3$(EXEEXT)
+ is $(libexec_PROGRAMS) == rmt$(EXEEXT)
+
+test-revert:
+ is $(bin_PROGRAMS) == maude$(EXEEXT)
+ is $(sbin_PROGRAMS) == maude.static$(EXEEXT)
+ is $(check_PROGRAMS) == maude3$(EXEEXT)
+ is $(libexec_PROGRAMS) ==
END
$ACLOCAL
grep 'maude3__EXEEXT__OBJECTS' Makefile.in && exit 1
./configure
-
-run_make -O EXEEXT=.foo print
-
-grep '1BEG: maude.foo mt.foo :END1' stdout
-grep '2BEG: maude.static.foo :END2' stdout
-grep '3BEG: maude3.foo :END3' stdout
-grep '4BEG: rmt.foo :END4' stdout
+run_make test-default
+run_make test-default EXEEXT=.foo
./configure revert=yes
-
-run_make -O EXEEXT=.foo print
-
-grep '1BEG: maude.foo :END1' stdout
-grep '2BEG: maude.static.foo :END2' stdout
-grep '3BEG: maude3.foo :END3' stdout
-grep '4BEG: :END4' stdout
+run_make test-revert
+run_make test-revert EXEEXT=.foo
:
b1.h
endif
-.PHONY: print
-print:
- @echo BEG: $(foo) :END
+test:
+ is $(foo) == 0.h a0.h a1.h a2.h a3.h
END
$ACLOCAL
$AUTOMAKE
./configure
-run_make -O print
-$FGREP 'BEG: 0.h a0.h a1.h a2.h a3.h :END' stdout
+$MAKE test
:
## PROGRAMS primary, otherwise automake will complain.
EXTRA_PROGRAMS =
-print-programs:
- @echo BEG1: \$(noinst_PROGRAMS) :END1
- @echo BEG2: \$(bin_PROGRAMS) :END2
- @echo BEG3: \$(check_PROGRAMS) :END3
+test-real-empty:
+ is \$(noinst_PROGRAMS) == x
+ is \$(bin_PROGRAMS) ==
+ is \$(check_PROGRAMS) == zardoz x
+
+test-fake-empty:
+ is \$(noinst_PROGRAMS) == x X
+ is \$(bin_PROGRAMS) == X
+ is \$(check_PROGRAMS) == zardoz x X
END
$ACLOCAL
cat t-programs
grep '^ *$' t-programs && exit 1
-run_make -O print-programs
-grep '^BEG1: x :END1$' stdout
-grep '^BEG2: :END2$' stdout
-grep '^BEG3: zardoz x :END3$' stdout
-
-run_make -O am__empty=X print-programs
-grep '^BEG1: x X :END1$' stdout
-grep '^BEG2: X :END2$' stdout
-grep '^BEG3: zardoz x X :END3$' stdout
+run_make test-real-empty
+run_make test-fake-empty am__empty=X
: