sc_tests_plain_aclocal \
sc_tests_plain_perl \
sc_tests_required_after_defs \
-sc_tests_overriding_macros_on_cmdline \
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
+ sc_tests_no_configure_in \
sc_tests_PATH_SEPARATOR \
sc_tests_logs_duplicate_prefixes \
sc_tests_makefile_variable_order \
override-conditional-2.test \
java-nobase.test \
objext-pr10128.test \
+ parallel-tests-many.test \
pr8365-remake-timing.test \
-lex-subobj-nodep.test \
remake-am-pr10111.test \
remake-m4-pr10111.test \
txinfo5.test \
Use `$PATH_SEPARATOR', not hard-coded `:', as the separator of
PATH's entries.
- It's more important to make sure that a feature works, than
- make sure that Automake's output looks correct. It might look
- correct and still fail to work. In other words, prefer
- running `make' over grepping `Makefile.in' (or do both).
+ It's more important to make sure that a feature works, than make sure
+ that the output of Automake-NG looks correct. It might look correct
+ and still fail to work. In other words, prefer running `make' over
+ grepping `Makefile.in' (or do both).
If you run $AUTOMAKE or $AUTOCONF several times in the same test
- and change `configure.in' by the meantime, do
+ and change `configure.ac' by the meantime, do
rm -rf autom4te.cache
- before the following runs. On fast machines the new `configure.in'
+ before the following runs. On fast machines the new `configure.ac'
could otherwise have the same timestamp as the old `autom4te.cache'.
Alternatively, use `--force' for subsequent runs of the tools.
# with a dot (like "./Makefile"), since the remake rules might be subtly
# broken in that case.
-required=GNUmake
. ./defs || Exit 1
- cat > configure.in << END
+ cat > configure.ac << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([./Makefile])
# Require GNU make for this test. SunOS Make does not support
# `$$' in a target or a dependency (it outputs the empty string instead).
-required=GNUmake
. ./defs || Exit 1
- echo AC_OUTPUT >> configure.in
+ echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
mydir = $(prefix)/my
# See also sister test 'extra11.test', that check a similar usage
# with the involvement of the $(wildcard) GNU make builtin.
-required=GNUmake
. ./defs || Exit 1
- echo AC_OUTPUT >> configure.in
+ echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'END'
EXTRA_DIST = *.foo
# Check for more complex usage of wildcards in EXTRA_DIST.
# Suggested by observations from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
- echo AC_OUTPUT >> configure.in
+ echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'END'
AUTOMAKE_OPTIONS = -Wno-portability
# $srcdir != $builddir, if properly declared.
# Suggested by observations from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
- echo AC_OUTPUT >> configure.in
+ echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'END'
# Automake should not assume that make files are called Makefile.
# Report from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
- cat >> configure.in << 'END'
+ cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/GNUmakefile])
AC_OUTPUT
END
END
chmod a+x fake-javac
- cat >> configure.in <<'END'
-# Remove JAVAC from the environment, so that it won't interfere
-# with `make -e' below.
-unset JAVAC || :
-
+ cat >> configure.ac <<'END'
AC_PROG_CC
# Simulate presence of the java compiler using our fake-javac script.
AC_SUBST([JAVAC], ['$(abs_top_srcdir)'/fake-javac])
END
chmod a+x fake-lex
- cat >> configure.in <<'END'
-# Remove Lex from the environment, so that it won't interfere
-# with `make -e' below.
-unset LEX || :
-
+ cat >> configure.ac <<'END'
AC_SUBST([CC], [false])
# Simulate presence of Lex using our fake-lex script.
AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex])
END
chmod a+x fake-lex
- cat >> configure.in <<'END'
-# Remove Lex from the environment, so that it won't interfere
-# with `make -e' below.
-unset LEX || :
-
+ cat >> configure.ac <<'END'
AC_SUBST([CXX], [false])
# Simulate presence of Lex using our fake-lex script.
AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex])
plan_ 14
-if echo "all: ; @+printf %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; then
- make_plus_silence () { return 0; }
-else
- make_plus_silence () { return 1; }
-fi
-
mkdir sub
- echo AC_OUTPUT >> configure.in
+ echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'END'
all:
# depend on the time at which autoconf and automake update the cache
# via autom4te.
-required=GNUmake
. ./defs || Exit 1
- cat >configure.in <<END
+ cat >configure.ac <<END
m4_include([version.m4])
AC_INIT([$me], [THE_VERSION])
AM_INIT_AUTOMAKE
. ./defs || Exit 1
-# Does $MAKE support the '.MAKE' special target?
-have_dotmake=false
-if using_gmake; then
- have_dotmake=: # GNU make must support it.
-else
- unindent > mk.tmp << 'END'
- targ.tmp:
- : > $@
- .MAKE: targ.tmp
-END
- if $MAKE -n -f mk.tmp targ.tmp && test -f targ.tmp; then
- have_dotmake=:
- fi
-fi
-
mkdir sub sub2
- cat >> configure.in << 'END'
+ cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
AC_OUTPUT
END
errmsg = ::OOPS:: Recursion too deep
-if IS_GNU_MAKE
+is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
- is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
-
-## Indenteation here required to avoid confusing Automake.
+## Extra indentation here required to avoid confusing Automake.
+## FIXME: now that we assume make is GNU make, this shouldn't happen!
ifeq ($(is_too_deep),no)
+ # All is ok.
else
- $(error $(errmsg), $(MAKELEVEL) levels)
+ $(error $(errmsg), $(MAKELEVEL) levels)
endif
-
-else !IS_GNU_MAKE
-
-# We use mkdir to detect the level of recursion, since it is easy
-# to use and assured to be portably atomical. Also use an higher
-# number than with GNU make above, since the level used here can
-# be incremented by tow or more per recursion.
-recursion-not-too-deep:
- @ok=no; \
- for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 \
- 18 19 20 21 22 23 24 25 26 27 28 29; \
- do \
- echo " mkdir rec-$$i.d"; \
- if mkdir rec-$$i.d; then \
- ok=yes; break; \
- else :; fi; \
- done; \
- test $$ok = yes || { echo '$(errmsg)' >&2; exit 1; }
-.PHONY: recursion-not-too-deep
-clean-local:
- rmdir rec-[0-9].d
-
-targets = all check recheck $(TESTS) $(TEST_LOGS) $(TEST_SUITE_LOG)
-$(targets): recursion-not-too-deep
-
-# For BSD make.
-.BEGIN: recursion-not-too-deep
-
-endif !IS_GNU_MAKE
END
- echo AC_OUTPUT >> configure.in
-if using_gmake; then
- cond=:
-else
- cond=false
-fi
-
-cat >> configure.ac << END
-AM_CONDITIONAL([IS_GNU_MAKE], [$cond])
-AC_OUTPUT
-END
++echo AC_OUTPUT >> configure.ac
# Another helpful idiom to avoid hanging on capable systems. The subshell
# is needed since `ulimit' might be a special shell builtin.
*\ -j*) skip_ "\$MAKE contains \`-j'";;
esac
- cat >> configure.in << 'END'
-if using_gmake; then
- j=-j
-else
- unindent > Makefile <<END
- all: one two
- one:
- $sleep && test -f two
- two:
- echo ok > \$@
-END
- for j in "-j" "-j " NONE; do
- if test x"$j" = xNONE; then
- skip_ "can't run make in parallel mode"
- fi
- $MAKE ${j}2 all >output 2>&1 || continue
- $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue
- break
- done
- rm -f one output Makefile
-fi
-
+ cat >> configure.ac << 'END'
AC_OUTPUT
END
# It merely serves as demonstration. :-)
am_parallel_tests=yes
-required='cc native GNUmake'
+required='cc native'
. ./defs || Exit 1
- cat >> configure.in << 'END'
+ cat >> configure.ac << 'END'
AC_PROG_CC
AC_OUTPUT
END
$sleep
- sed -e "s|FOO_MACRO|$macro_value|" configure.in > t
- mv -f t configure.in
+ sed -e "s|FOO_MACRO|$macro_value|" configure.ac > t
+ mv -f t configure.ac
rm -f m4/foo.m4
-using_gmake || $MAKE Makefile
$MAKE test
:
sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' \
m4/macros.m4 > m4/defs.m4
rm -f m4/macros.m4 m4/bar.m4
- sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' configure.in > t
- mv -f t configure.in
+ sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' configure.ac > t
+ mv -f t configure.ac
-using_gmake || $MAKE Makefile
$MAKE test
$MAKE distdir
ls -l $distdir $distdir/*
./configure
# Sanity check: Makefile doesn't get updated uselessly.
-ACLOCAL=false AUTOMAKE=false AUTOCONF=false $MAKE -e
+$MAKE ACLOCAL=false AUTOMAKE=false AUTOCONF=false
$sleep
- sed "s|magic|magic2|" configure.in > t
- mv -f t configure.in
+ sed "s|magic|magic2|" configure.ac > t
+ mv -f t configure.ac
cd sub
-AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" $MAKE -e Makefile
+$MAKE Makefile AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL"
cd ..
# For debugging.
debug_info
$sleep
- sed "s|magic|$magic1|" configure.in > t
- mv -f t configure.in
+ sed "s|magic|$magic1|" configure.ac > t
+ mv -f t configure.ac
cd sub
-$remake
+$MAKE
cd ..
debug_info
$FGREP $magic1 configure
magic2=__MagicStringTwo__
magic3=%%MagicStringThree%%
-if using_gmake; then
- remake="$MAKE nil"
-else
- remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
- cat >> configure.in <<END
+ cat >> configure.ac <<END
m4_include([foo.m4])
AC_SUBST([FINGERPRINT], [my_fingerprint])
AC_OUTPUT
magic2=__MagicStringTwo__
magic3=%%MagicStringThree%%
-if using_gmake; then
- remake="$MAKE nil"
-else
- remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
- cat >> configure.in <<'END'
+ cat >> configure.ac <<'END'
AC_OUTPUT
END
magic2=__MagicStringTwo__
magic3=%%MagicStringThree%%
-if using_gmake; then
- remake="$MAKE nil"
-else
- remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
- cat >> configure.in <<END
+ cat >> configure.ac <<END
FINGERPRINT='my_fingerprint'
AC_SUBST([FINGERPRINT])
AC_OUTPUT
magic2=__MagicStringTwo__
magic3=%%MagicStringThree%%
- cat > configure.in <<END
-# See if the user's make implementation support an include directive.
-# We need it in this test.
-echo 'all:; @echo include is supported' > incl.mk
-echo 'include incl.mk' > gnu-style.mk
-echo '.include "incl.mk"' > bsd-style.mk
-if $MAKE -f gnu-style.mk | grep 'include is supported'; then
- echo "$me: GNU make include style supported"
- include_zardoz='include zardoz'
-elif $MAKE -f bsd-style.mk | grep 'include is supported'; then
- echo "$me: BSD make include style supported"
- include_zardoz='.include "zardoz"'
-else
- skip_ "make doesn't support any \"include\" directive"
-fi
-
+ cat > configure.ac <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([zardoz])
. ./defs || Exit 1
- cat >>configure.in <<'EOF'
-if using_gmake; then
- remake="$MAKE"
-else
- remake="$MAKE Makefile"
-fi
-
+ cat >>configure.ac <<'EOF'
AM_MAINTAINER_MODE
m4_include([foo.m4])
if test ! -f rebuild_ok; then
# triggered by default. ($MAKE will fail if they are, because the
# tools are set to false.)
$sleep
- touch aclocal.m4 Makefile.am configure.in foo.m4
+ touch aclocal.m4 Makefile.am configure.ac foo.m4
-$remake
+$MAKE
# Make sure the rebuild rule for Makefile is triggered.
$sleep
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
- cat >> configure.in <<END
-if using_gmake; then
- remake_() { $MAKE nil; }
-else
- remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
+ cat >> configure.ac <<END
FINGERPRINT=BadBadBad
AC_SUBST([FINGERPRINT])
AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
$MAKE # Should be a no-op.
$sleep
- sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.in >t
- mv -f t $srcdir/configure.in
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.ac >t
+ mv -f t $srcdir/configure.ac
- remake_
+ $MAKE nil
$FGREP FINGERPRINT Makefile # For debugging.
$FGREP $magic1 Makefile
test x"`./foo.sh`" = x"$magic1"
$sleep
echo cat > $srcdir/tweak-configure-in # Make it a no-op again.
- sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.in >t
- mv -f t $srcdir/configure.in
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.ac >t
+ mv -f t $srcdir/configure.ac
- using_gmake || remake_
$MAKE distcheck
$FGREP $magic1 Makefile && Exit 1 # Sanity check.
$FGREP $magic2 Makefile && Exit 1 # Likewise.
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
- cat >> configure.in <<END
-if using_gmake; then
- remake_() { $MAKE nil; }
-else
- remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
+ cat >> configure.ac <<END
FINGERPRINT='my_fingerprint'
AC_SUBST([FINGERPRINT])
AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
- cat >> configure.in <<END
-if using_gmake; then
- remake_() { $MAKE nil; }
-else
- remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
+ cat >> configure.ac <<END
FINGERPRINT='my_fingerprint'
AC_SUBST([FINGERPRINT])
AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
# Test to make sure Automake supports implicit rules with dot-less
# extensions. Se also related "grepping" test suffix6.test.
-required=GNUmake # Other makes might not grok dot-less suffix rules.
. ./defs || Exit 1
- cat >> configure.in << 'END'
+ cat >> configure.ac << 'END'
# $(LINK) is not defined automatically by Automake, since the *_SOURCES
# variables don't contain any known extension (.c, .cc, .f, ...).
# So we need this hack -- but since such an hack can also serve as a
# Vala sources and C sources in the same program. Functional test.
-required='valac cc GNUmake'
+required='valac cc'
. ./defs || Exit 1
- cat >> configure.in <<'END'
+ cat >> configure.ac <<'END'
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_VALAC
# Test to make sure vala support handles from-scratch VPATH builds.
# See automake bug#8753.
-required="valac GNUmake"
+required=valac
. ./defs || Exit 1
- cat >> configure.in << 'END'
+ cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([hello.vala])
AC_PROG_CC
AM_PROG_VALAC([0.7])
. ./defs || Exit 1
- echo AC_OUTPUT >> configure.in
-cat >>configure.ac << END
-AC_PROG_CC
-AC_OUTPUT
-END
++echo AC_OUTPUT >> configure.ac
-cat > Makefile.am << END
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c foo.h
-END
+unset PREFOO FOO BAR BAZ XFOO XBAZ || :
+
+cat > Makefile.am <<'END'
+PREFOO = bar
+FOO := foo$(PREFOO)$(XFOO)
+XFOO = fail
+BAR ?= barbar
-cat >foo.c << END
-#include "foo.h"
+.PHONY: test1 test2
+test1:
+ test $(FOO) = foobar
+ test $(BAR) = barbar
+test2:
+ test $(FOO) = foobar
+ test $(BAR) = rabrab
END
-: >foo.h
$ACLOCAL
-$AUTOMAKE
$AUTOCONF
-./configure --disable-dependency-tracking 2>stderr || {
- stat=$?; cat stderr >&2; Exit $stat;
-}
-cat stderr >&2
-grep shift stderr && Exit 1
+$AUTOMAKE
+./configure
+$MAKE test1
+PREFOO=notseen FOO=notseen BAR=rabrab $MAKE test2
:
required=yacc
. ./defs || Exit 1
- cat >> configure.in << 'END'
-# This test is bounded to fail for any implementation that
-# triggers automake bug#7884.
-useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
-
+ cat >> configure.ac << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
END
chmod a+x fake-yacc
- cat >> configure.in <<'END'
-# Remove Yacc from the environment, so that it won't interfere
-# with `make -e' below.
-unset YACC || :
-
+ cat >> configure.ac <<'END'
AC_SUBST([CC], [false])
# Simulate presence of Yacc using our fake-yacc script.
AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])
END
chmod a+x fake-yacc
- cat >> configure.in <<'END'
-# Remove Yacc from the environment, so that it won't interfere
-# with `make -e' below.
-unset YACC || :
-
+ cat >> configure.ac <<'END'
AC_SUBST([CXX], [false])
# Simulate presence of Yacc using our fake-yacc script.
AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc])