/doc/automake*.dvi
/doc/automake*.pdf
/doc/automake*.ps
+/doc/automake*.t2d/
+/doc/automake*.t2p/
/doc/automake*.1
/doc/aclocal*.1
/doc/stamp-vti
/t/*.dir
/t/*.log
/t/*.trs
+/contrib/t/*.dir
+/contrib/t/*.log
+/contrib/t/*.trs
/t/pm/*.log
/t/pm/*.trs
/t/perf/*.log
lib/mdate-sh \
lib/missing \
lib/mkinstalldirs \
- lib/elisp-comp \
lib/ylwrap \
lib/depcomp \
lib/compile \
m4/ar-lib.m4 \
m4/as.m4 \
m4/auxdir.m4 \
- m4/ccstdc.m4 \
m4/cond.m4 \
m4/cond-if.m4 \
m4/depend.m4 \
m4/depout.m4 \
m4/dmalloc.m4 \
+ m4/extra-recurs.m4 \
m4/gcj.m4 \
- m4/header.m4 \
m4/init.m4 \
m4/install-sh.m4 \
m4/lead-dot.m4 \
m4/minuso.m4 \
m4/missing.m4 \
m4/mkdirp.m4 \
- m4/obsol-gt.m4 \
- m4/obsol-lt.m4 \
- m4/obsolete.m4 \
m4/options.m4 \
m4/protos.m4 \
m4/python.m4 \
$(generated_TESTS): $(srcdir)/gen-testsuite-part
$(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
+# Hand-written tests for stuff in 'contrib/'.
+include $(srcdir)/contrib/t/local.am
+TESTS += $(contrib_TESTS)
+EXTRA_DIST += $(contrib_TESTS)
+
# Static dependencies valid for each test case (also further
# extended later). Note that use 'noinst_' rather than 'check_'
# as the prefix, because we really want them to be built by
.PHONY: check-no-trailing-backslash-in-recipes
## Checking the list of tests.
-test_subdirs = t t/pm
+test_subdirs = t t/pm contrib/t
include $(srcdir)/t/CheckListOfTests.am
# Run the testsuite with the installed aclocal and automake.
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
- -set x t/*.dir; shift; \
- if test "$$#,$$1" = "1,*.dir"; then \
- : there is no test directory to clean; \
- else \
- find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
- rm -rf "$$@"; \
- fi;
+## Directories candidate to be test directories match this wildcard.
+ @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
+## The 'nullglob' bash option is not portable, so use perl.
+ dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
+ if test -n "$$dirs"; then \
+## Errors in find are acceptable, errors in rm are not.
+ find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
+ echo " rm -rf $$dirs"; \
+ rm -rf $$dirs || exit 1; \
+ fi
## ---------------- ##
+New in 1.13:
+
+* Version requirements:
+
+ - Autoconf 2.65 or greater is required.
+
+ - The rules to build PDF and DVI output from Texinfo input now
+ requires Texinfo 4.9 or later.
+
+ - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
+ option) has been removed. See discussion about automake bug#11034
+ for more background.
+
+ - The automake-provided '@mkdir_p@' configure substitution and
+ AM_PROG_MKDIR m4 macro have been removed. They had been obsolete
+ since automake 1.10, and actively deprecated since Automake 1.12.1.
+ However, to maintain a degree of backward-compatibility, the make
+ variable '$(mkdir_p)' is still defined (now simple as an alias to
+ '$(MKDIR_P)'). It will probably be removed in future major versions
+ of Automake (probably 1.14).
+
+ - The deprecated aclocal option '--acdir' has been removed. You
+ should use the options '--automake-acdir' and '--system-acdir'
+ instead (which have been introduced in Automake 1.11.2).
+
+ - The following long-obsolete m4 macros have been removed:
+
+ AM_PROG_CC_STDC: superseded by AC_PROG_CC since October 2002
+ fp_PROG_CC_STDC: broken alias for AM_PROG_CC_STDC
+ fp_WITH_DMALLOC: old alias for AM_WITH_DMALLOC
+ AM_CONFIG_HEADER: superseded by AC_CONFIG_HEADERS since July 2002
+ ud_PATH_LISPDIR: old alias for AM_PATH_LISPDIR
+ jm_MAINTAINER_MODE: old alias for AM_MAINTAINER_MODE
+ ud_GNU_GETTEXT: old alias for AM_GNU_GETTEXT
+ gm_PROG_LIBTOOL: old alias for AC_PROG_LIBTOOL
+ fp_C_PROTOTYPES: old alias for AM_C_PROTOTYPES (which was part
+ of the now-removed automatic de-ANSI-fication
+ support of Automake)
+
+ - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
+
+* Obsolescent features:
+
+ - Use of the long-deprecated two- and three-arguments invocation forms
+ of the AM_INIT_AUTOMAKE is not documented anymore. It's still
+ supported though (albeit with a warning in the 'obsolete' category),
+ to cater for people who want to define the version number for their
+ package dynamically (e.g., from the current VCS revision). We'll
+ have to continue this support until Autoconf itself is fixed to allow
+ better support for such dynamic version numbers.
+
+* Elisp byte-compilation:
+
+ - The byte compilation of '.el' files into '.elc' files is now done
+ with a suffix rule. This has simplified the compilation process, and
+ more importantly made it less brittle. The downside is that emacs is
+ now invoked once for each '.el' files, which cause some noticeable
+ slowdowns. These should however be mitigated on multicore machines
+ (which are becoming the norm today) if concurrent make ("make -j")
+ is used.
+
+ - Elisp files placed in a subdirectory are now byte-compiled to '.elc'
+ files in the same subdirectory; for example, byte-compiling of file
+ 'sub/foo.el' file will result in 'sub/foo.elc' rather than in
+ 'foo.elc'. This behaviour is backward-incompatible with older
+ Automake versions, but it is more natural and more sane. See also
+ automake bug#7441.
+
+ - The Emacs invocation performing byte-compilation of '.el' files honors
+ the $(AM_ELCFLAGS) and $(ELCFLAGS) variables; as typical, the former
+ one is developer-reserved and the latter one user-reserved.
+
+ - The 'elisp-comp' script, once provided by Automake, has been rendered
+ obsoleted by the just-described changes, and thus removed.
+
+* Changes to Automake-generated testsuite harnesses:
+
+ - The parallel testsuite harness (previously only enabled by the
+ 'parallel-tests' option) is the default one; the older serial
+ testsuite harness will still be available through the use of the
+ 'serial-tests' option (introduced in Automake 1.12).
+
+ - The 'color-tests' option is now unconditionally activated by default.
+ In particular, this means that testsuite output is now colorized by
+ default if the attached terminal seems to support ANSI escapes, and
+ that the user can force output colorization by setting the variable
+ AM_COLOR_TESTS to "always". The 'color-tests' is still recognized
+ for backward-compatibility, although it's a handled as a no-op now.
+
+* Silent rules support:
+
+ - Support for silent rules is now always active in Automake-generated
+ Makefiles. So, although the verbose output is still the default,
+ the user can now always use "./configure --enable-silent-rules" or
+ "make V=0" to enable quieter output in the package he's building.
+
+ - The 'silent-rules' option has now become a no-op, preserved for
+ backward-compatibility only. In particular, its use does not disable
+ the warnings in the 'portability-recursive' category anymore.
+
+* Texinfo Support:
+
+ - The rules to build PDF and DVI files from Texinfo input now use the
+ '--build-dir' option, to keep the auxiliary files used by texi2dvi
+ and texi2pdf around without cluttering the build directory, and to
+ make it possible to run the "dvi" and "pdf" recipes in parallel.
+
+* Automatic remake rules and 'missing' script:
+
+ - The 'missing' script does not try anymore to update the timestamp
+ of out-of-date files that require a maintainer-specific tool to be
+ remade, in case the user lacks such a tool (or has a too-old version
+ of it). It just give a useful warning, and in some cases also a tip
+ about how to obtain such a tool.
+
+ - The missing script has thus become useless as a (poor) way to work
+ around the sketched-timestamps issues that can happen for projects
+ that keep generated files committed in their VCS repository. Such
+ projects are now encouraged to write a custom "fix-timestamps.sh"
+ script to avoid such issues; a simple example is provided in the
+ "CVS and generated files" chapter of the automake manual.
+
+* Recursive targets:
+
+ - The user can now define his own recursive targets that recurse
+ in the directories specified in $(SUBDIRS). This can be done by
+ specifying the name of such targets in invocations of the new
+ 'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
+
+* Tags:
+
+ - Any failure in the recipe of the "tags", "ctags", "cscope" or
+ "cscopelist" targets in a subdirectory is now propagated to the
+ top-level make invocation.
+
+ - Tags are correctly computed also for files in _SOURCES variables that
+ only list files with non-standard suffixes (see automake bug#12372).
+
+* Improvements to aclocal and related rebuilds rules:
+
+ - The Autoconf-provided macro AC_CONFIG_MACRO_DIR is now traced by
+ aclocal, and can be used to declare the local m4 include directory.
+ Formerly, one had to specify it with an explicit '-I' option to the
+ 'aclocal' invocation.
+
+ - The special make variable ACLOCAL_AMFLAGS is deprecated; future
+ Automake versions will warn about its use, and later version will
+ remove support for it altogether.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
New in 1.12.5:
* WARNING: Future backward-incompatibilities!
# user-supplied directories first, then the directory containing the
# automake macros, and finally the system-wide directories for
# third-party macros.
-# @user_includes can be augmented with -I.
+# @user_includes can be augmented with -I or AC_CONFIG_MACRO_DIR.
# @automake_includes can be reset with the '--automake-acdir' option.
# @system_includes can be augmented with the 'dirlist' file or the
# ACLOCAL_PATH environment variable, and reset with the '--system-acdir'
my $serial_line_rx = '^#\s*serial\s+(\S*)';
my $serial_number_rx = '^\d+(?:\.\d+)*$';
-# Autoconf version
-# Set by trace_used_macros.
+# Autoconf version. This variable is set by 'trace_used_macros'.
my $ac_version;
+# Primary user directory containing extra m4 files for macros
+# definition, as extracted from call to macro AC_CONFIG_MACRO_DIR.
+# This variable is set by 'trace_used_macros'.
+my $ac_config_macro_dir;
+
# If set, names a temporary file that must be erased on abnormal exit.
my $erase_me;
$traces .= join (' ',
(map { "'$_'" }
(grep { exists $files{$_} } @file_order))) . " ";
+
# All candidate macros.
$traces .= join (' ',
(map { "--trace='$_:\$f::\$n::\$1'" }
('AC_DEFUN',
'AC_DEFUN_ONCE',
'AU_DEFUN',
- '_AM_AUTOCONF_VERSION')),
+ '_AM_AUTOCONF_VERSION',
+ 'AC_CONFIG_MACRO_DIR')),
# Do not trace $1 for all other macros as we do
# not need it and it might contains harmful
# characters (like newlines).
my $tracefh = new Automake::XFile ("$traces $configure_ac |");
+ $ac_config_macro_dir = undef;
+
my %traced = ();
while ($_ = $tracefh->getline)
$traced{$macro} = 1 if exists $macro_seen{$macro};
- $map_traced_defs{$arg1} = $file
- if ($macro eq 'AC_DEFUN'
- || $macro eq 'AC_DEFUN_ONCE'
- || $macro eq 'AU_DEFUN');
-
- $ac_version = $arg1 if $macro eq '_AM_AUTOCONF_VERSION';
+ if ($macro eq 'AC_DEFUN' || $macro eq 'AC_DEFUN_ONCE'
+ || $macro eq 'AU_DEFUN')
+ {
+ $map_traced_defs{$arg1} = $file;
+ }
+ elsif ($macro eq '_AM_AUTOCONF_VERSION')
+ {
+ $ac_version = $arg1;
+ }
+ elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
+ {
+ $ac_config_macro_dir = $arg1;
+ }
}
$tracefh->close;
exit 0;
}
-# Using --acdir overrides both the automake (versioned) directory and
-# the public (unversioned) system directory. This usage is obsolete.
-sub handle_acdir_option ($$)
-{
- msg 'obsolete', '', "'--acdir' is deprecated\n";
- @system_includes = ($_[1]);
- @automake_includes = ();
-}
-
# Parse command line.
sub parse_arguments ()
{
(
'help' => sub { usage(0); },
'version' => \&version,
- 'acdir=s' => \&handle_acdir_option,
'system-acdir=s' => sub { shift; @system_includes = @_; },
'automake-acdir=s' => sub { shift; @automake_includes = @_; },
'diff:s' => \$diff_command,
$dry_run = 1;
}
- if ($install && !@user_includes)
- {
- fatal ("--install should copy macros in the directory indicated by the"
- . "\nfirst -I option, but no -I was supplied");
- }
-
# Finally, adds any directory listed in the 'dirlist' file.
if (open (DIRLIST, "$system_includes[0]/dirlist"))
{
# we did not rerun aclocal, the next run of aclocal would produce a
# different aclocal.m4.
my $loop = 0;
+my $rerun_due_to_macrodir = 0;
while (1)
{
++$loop;
- prog_error "too many loops" if $loop > 2;
+ prog_error "too many loops" if $loop > 2 + $rerun_due_to_macrodir;
reset_maps;
scan_m4_files;
scan_configure;
last if $exit_code;
my %macro_traced = trace_used_macros;
+
+ if (!$rerun_due_to_macrodir && defined $ac_config_macro_dir)
+ {
+ # The directory specified by the AC_CONFIG_MACRO_DIR m4 macro
+ # (if any) must after the user includes specified explicitly
+ # with the '-I' option.
+ push @user_includes, $ac_config_macro_dir
+ if defined $ac_config_macro_dir;
+ # We might have to scan some new directory of .m4 files.
+ $rerun_due_to_macrodir++;
+ next;
+ }
+
+ if ($install && !@user_includes)
+ {
+ fatal "installation of third-party macros impossible without " .
+ "-I options nor AC_CONFIG_MACRO_DIR m4 macro";
+ }
+
last if write_aclocal ($output_file, keys %macro_traced);
last if $dry_run;
}
(qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
ar-lib compile config.guess config.rpath
- config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+ config.sub depcomp install-sh libversion.in mdate-sh
missing mkinstalldirs py-compile texinfo.tex ylwrap),
@libtool_files, @libtool_sometimes);
# Whether AM_GNU_GETTEXT_INTL_SUBDIR has been seen.
my $seen_gettext_intl = 0;
+# The arguments of the AM_EXTRA_RECURSIVE_TARGETS call (if any).
+my @extra_recursive_targets = ();
+
# Lists of tags supported by Libtool.
my %libtool_tags = ();
# 1 if Libtool uses LT_SUPPORTED_TAG. If it does, then it also
'install-ps-am' => 1,
'install-info-am' => 1,
'installcheck-am' => 1,
- 'uninstall-am' => 1,
-
- 'install-man' => 1,
+ 'uninstall-am' => 1,
+ 'tags-am' => 1,
+ 'ctags-am' => 1,
+ 'cscopelist-am' => 1,
+ 'install-man' => 1,
);
# Queue to push require_conf_file requirements to.
################################################################
-# 'silent-rules' mode handling functions.
+# Silent rules handling functions.
# verbose_var (NAME)
# ------------------
-# The public variable stem used to implement 'silent-rules'.
+# The public variable stem used to implement silent rules.
sub verbose_var ($)
{
my ($name) = @_;
# verbose_private_var (NAME)
# --------------------------
-# The naming policy for the private variables for 'silent-rules'.
+# The naming policy for the private variables for silent rules.
sub verbose_private_var ($)
{
my ($name) = @_;
# define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE])
# ----------------------------------------------------------
-# For 'silent-rules' mode, setup VAR and dispatcher, to expand to
-# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to empty)
-# if not.
+# For silent rules, setup VAR and dispatcher, to expand to
+# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to
+# empty) if not.
sub define_verbose_var ($$;$)
{
my ($name, $silent_val, $verbose_val) = @_;
my $pvar = verbose_private_var ($name);
my $silent_var = $pvar . '_0';
my $verbose_var = $pvar . '_1';
- if (option 'silent-rules')
- {
- # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
- # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
- # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
- # See AM_SILENT_RULES in m4/silent.m4.
- define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
- define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', INTERNAL);
- Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
- $silent_val, '', INTERNAL, VAR_ASIS)
- if (! vardef ($silent_var, TRUE));
- Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
- $verbose_val, '', INTERNAL, VAR_ASIS)
- if (! vardef ($verbose_var, TRUE));
-}
+ # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
+ # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
+ # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
+ # See AM_SILENT_RULES in m4/silent.m4.
+ define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
+ define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
+ INTERNAL);
+ Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
+ $silent_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($silent_var, TRUE));
+ Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
+ $verbose_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($verbose_var, TRUE));
}
# Above should not be needed in the general automake code.
sub verbose_flag ($)
{
my ($name) = @_;
- return '$(' . verbose_var ($name) . ')'
- if (option 'silent-rules');
- return '';
+ return '$(' . verbose_var ($name) . ')';
}
sub verbose_nodep_flag ($)
{
my ($name) = @_;
- return '$(' . verbose_var ($name) . subst ('am__nodep') . ')'
- if (option 'silent-rules');
- return '';
+ return '$(' . verbose_var ($name) . subst ('am__nodep') . ')';
}
# silent_flag
# define_verbose_tagvar (NAME)
# ----------------------------
-# Engage the needed 'silent-rules' machinery for tag NAME.
+# Engage the needed silent rules machinery for tag NAME.
sub define_verbose_tagvar ($)
{
my ($name) = @_;
- if (option 'silent-rules')
- {
- define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
- }
+ define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
}
# define_verbose_texinfo
# ----------------------
-# Engage the needed 'silent-rules' machinery for assorted texinfo commands.
+# Engage the needed silent rules machinery for assorted texinfo commands.
sub define_verbose_texinfo ()
{
my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
# define_verbose_libtool
# ----------------------
-# Engage the needed 'silent-rules' machinery for 'libtool --silent'.
+# Engage the needed silent rules machinery for 'libtool --silent'.
sub define_verbose_libtool ()
{
define_verbose_var ('lt', '--silent');
sub handle_silent ()
{
- return unless option 'silent-rules';
# Define "$(AM_V_P)", expanding to a shell conditional that can be
# used in make recipes to determine whether we are being run in
# silent mode or not. The choice of the name derives from the LISP
# also "the '-P' convention" in the Jargon File); we do so for lack
# of a better convention.
define_verbose_var ('P', 'false', ':');
- # *Always* provide the user with 'AM_V_GEN' for 'silent-rules' mode.
+ # *Always* provide the user with '$(AM_V_GEN)', unconditionally.
define_verbose_tagvar ('GEN');
define_verbose_var ('at', '@');
}
return 1 if process_option_list (@options);
}
- # Override portability-recursive warning.
- switch_warning ('no-portability-recursive')
- if option 'silent-rules';
-
if ($strictness == GNITS)
{
set_option ('readme-alpha', INTERNAL);
{
# Include auto-dep code. Don't include it if DEP_FILES would
# be empty.
- if (&saw_sources_p (0) && keys %dep_files)
+ if (keys %extension_seen && keys %dep_files)
{
# Set location of depcomp.
&define_variable ('depcomp',
## Handling Texinfo files. ##
## ------------------------ ##
-# ($OUTFILE, $VFILE, @CLEAN_FILES)
+# ($OUTFILE, $VFILE)
# &scan_texinfo_file ($FILENAME)
# ------------------------------
# $OUTFILE - name of the info file produced by $FILENAME.
# $VFILE - name of the version.texi file used (undef if none).
-# @CLEAN_FILES - list of byproducts (indexes etc.)
sub scan_texinfo_file ($)
{
my ($filename) = @_;
- # Some of the following extensions are always created, no matter
- # whether indexes are used or not. Other (like cps, fns, ... pgs)
- # are only created when they are used. We used to scan $FILENAME
- # for their use, but that is not enough: they could be used in
- # included files. We can't scan included files because we don't
- # know the include path. Therefore we always erase these files, no
- # matter whether they are used or not.
- #
- # (tmp is only created if an @macro is used and a certain e-TeX
- # feature is not available.)
- my %clean_suffixes =
- map { $_ => 1 } (qw(aux log toc tmp
- cp cps
- fn fns
- ky kys
- vr vrs
- tp tps
- pg pgs)); # grep 'new.*index' texinfo.tex
-
my $texi = new Automake::XFile "< $filename";
verb "reading $filename";
{
$vfile = $1;
}
-
- # Try to find new or unused indexes.
-
- # Creating a new category of index.
- elsif (/^\@def(code)?index (\w+)/)
- {
- $clean_suffixes{$2} = 1;
- $clean_suffixes{"$2s"} = 1;
- }
-
- # Merging an index into an another.
- elsif (/^\@syn(code)?index (\w+) (\w+)/)
- {
- delete $clean_suffixes{"$2s"};
- $clean_suffixes{"$3s"} = 1;
- }
-
}
if (! $outfile)
my $infobase = basename ($filename);
$infobase =~ s/\.te?xi(nfo)?$//;
- return ($outfile, $vfile,
- map { "$infobase.$_" } (sort keys %clean_suffixes));
+ return ($outfile, $vfile);
}
# If 'version.texi' is referenced by input file, then include
# automatic versioning capability.
- my ($out_file, $vtexi, @clean_files) =
+ my ($out_file, $vtexi) =
scan_texinfo_file ("$relative_dir/$texi")
or next;
- push (@mostly_cleans, @clean_files);
+ # Directory of auxiliary files and build by-products used by texi2dvi
+ # and texi2pdf.
+ push @mostly_cleans, "$infobase.t2d";
+ push @mostly_cleans, "$infobase.t2p";
# If the Texinfo source is in a subdirectory, create the
# resulting info in this subdirectory. If it is in the current
$texinfodir = ('$(srcdir)/'
. dirname (variable_value ('TEXINFO_TEX')));
}
- elsif (option 'cygnus')
- {
- $texinfodir = '$(top_srcdir)/../texinfo';
- define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
- }
elsif ($config_aux_dir_set_in_configure_ac)
{
$texinfodir = $am_config_aux_dir;
# Handle TAGS.
sub handle_tags
{
- my @tag_deps = ();
- my @ctag_deps = ();
- my @cscope_deps = ();
- if (var ('SUBDIRS'))
- {
- $output_rules .= ("tags-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
- . "\tdone\n");
- push (@tag_deps, 'tags-recursive');
- &depend ('.PHONY', 'tags-recursive');
- &depend ('.MAKE', 'tags-recursive');
-
- $output_rules .= ("ctags-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n"
- . "\tdone\n");
- push (@ctag_deps, 'ctags-recursive');
- &depend ('.PHONY', 'ctags-recursive');
- &depend ('.MAKE', 'ctags-recursive');
-
- $output_rules .= ("cscopelist-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
- . "\tdone\n");
- push (@cscope_deps, 'cscopelist-recursive');
- &depend ('.PHONY', 'cscopelist-recursive');
- &depend ('.MAKE', 'cscopelist-recursive');
- }
-
- if (&saw_sources_p (1)
- || var ('ETAGS_ARGS')
- || @tag_deps)
- {
- my @config;
- foreach my $spec (@config_headers)
- {
- my ($out, @ins) = split_config_file_spec ($spec);
- foreach my $in (@ins)
- {
- # If the config header source is in this directory,
- # require it.
- push @config, basename ($in)
- if $relative_dir eq dirname ($in);
- }
- }
- $output_rules .= &file_contents ('tags',
- new Automake::Location,
- CONFIG => "@config",
- TAGSDIRS => "@tag_deps",
- CTAGSDIRS => "@ctag_deps",
- CSCOPEDIRS => "@cscope_deps");
+ my @config;
+ foreach my $spec (@config_headers)
+ {
+ my ($out, @ins) = split_config_file_spec ($spec);
+ foreach my $in (@ins)
+ {
+ # If the config header source is in this directory,
+ # require it.
+ push @config, basename ($in)
+ if $relative_dir eq dirname ($in);
+ }
+ }
+ define_variable ('am__tagged_files',
+ '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
+ . "@config", INTERNAL);
+
+ if (rvar('am__tagged_files')->value_as_list_recursive
+ || var ('ETAGS_ARGS') || var ('SUBDIRS'))
+ {
+ $output_rules .= &file_contents ('tags', new Automake::Location);
set_seen 'TAGS_DEPENDENCIES';
- }
- elsif (reject_var ('TAGS_DEPENDENCIES',
- "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
- . " without\nsources or 'ETAGS_ARGS'"))
- {
- }
+ }
else
- {
+ {
+ reject_var ('TAGS_DEPENDENCIES',
+ "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
+ . " without\nsources or 'ETAGS_ARGS'");
# Every Makefile must define some sort of TAGS rule.
# Otherwise, it would be possible for a top-level "make TAGS"
- # to fail because some subdirectory failed.
- $output_rules .= "tags: TAGS\nTAGS:\n\n";
- # Ditto ctags and cscope.
- $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
- $output_rules .= "cscope cscopelist:\n\n";
- }
+ # to fail because some subdirectory failed. Ditto ctags and
+ # cscope.
+ $output_rules .=
+ "tags TAGS:\n\n" .
+ "ctags CTAGS:\n\n" .
+ "cscope cscopelist:\n\n";
+ }
}
}
-# $BOOLEAN
-# &for_dist_common ($A, $B)
-# -------------------------
-# Subroutine for &handle_dist: sort files to dist.
-#
-# We put README first because it then becomes easier to make a
-# Usenet-compliant shar file (in these, README must be first).
-#
-# FIXME: do more ordering of files here.
-sub for_dist_common
-{
- return 0
- if $a eq $b;
- return -1
- if $a eq 'README';
- return 1
- if $b eq 'README';
- return $a cmp $b;
-}
-
# handle_dist
# -----------
# Handle 'dist' target.
# Files to distributed. Don't use ->value_as_list_recursive
# as it recursively expands '$(dist_pkgdata_DATA)' etc.
my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
- @dist_common = uniq (sort for_dist_common (@dist_common));
+ @dist_common = uniq @dist_common;
variable_delete 'DIST_COMMON';
define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
@configuredeps);
- my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name)
- . (global_option 'no-dependencies' ? ' --ignore-deps' : '');
+ my $automake_options = '--' . $strictness_name .
+ (global_option 'no-dependencies' ? ' --ignore-deps' : '');
$output_rules .= file_contents
('configure',
}
}
+# Generate helper targets for user recursion, where needed.
+sub handle_user_recursion ()
+{
+ return unless @extra_recursive_targets;
+
+ define_pretty_variable ('am__extra_recursive_targets', TRUE, INTERNAL,
+ map { "$_-recursive" } @extra_recursive_targets);
+ my $aux = var ('SUBDIRS') ? 'recursive' : 'am';
+ foreach my $target (@extra_recursive_targets)
+ {
+ # This allows the default target's rules to be overridden in
+ # Makefile.am.
+ user_phony_rule ($target);
+ depend ("$target", "$target-$aux");
+ depend ("$target-am", "$target-local");
+ # Every user-defined recursive target 'foo' *must* have a valid
+ # associated 'foo-local' rule; we define it as an empty rule by
+ # default, so that the user can transparently extend it in his
+ # own Makefile.am.
+ pretty_print_rule ("$target-local:");
+ # $target-recursive might as well be undefined, so do not add
+ # it here; it's taken care of in subdirs.am anyway.
+ depend (".PHONY", "$target-am", "$target-local");
+ }
+}
+
# &do_check_merge_target ()
# -------------------------
push @check_tests, 'check-local'
if user_phony_rule 'check-local';
- # In --cygnus mode, check doesn't depend on all.
- if (option 'cygnus')
+ # The check target must depend on the local equivalent of
+ # 'all', to ensure all the primary targets are built. Then it
+ # must build the local check rules.
+ $output_rules .= "check-am: all-am\n";
+ if (@check)
{
- # Just run the local check rules.
- pretty_print_rule ('check-am:', "\t\t", @check);
- }
- else
- {
- # The check target must depend on the local equivalent of
- # 'all', to ensure all the primary targets are built. Then it
- # must build the local check rules.
- $output_rules .= "check-am: all-am\n";
- if (@check)
- {
- pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
- @check);
- depend ('.MAKE', 'check-am');
- }
+ pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @check);
+ depend ('.MAKE', 'check-am');
}
+
if (@check_tests)
{
pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
sub handle_per_suffix_test
{
my ($test_suffix, %transform) = @_;
- my ($pfx, $generic, $parallel_tests_option, $am_exeext);
- prog_error ("called with 'parallel-tests' option not set")
- unless $parallel_tests_option = option 'parallel-tests';
+ my ($pfx, $generic, $am_exeext);
if ($test_suffix eq '')
{
$pfx = '';
: 'FALSE';
}
# The "test driver" program, deputed to handle tests protocol used by
- # test scripts. By default, it's assumed that no protocol is used,
- # so we fall back to the old "parallel-tests" behaviour, implemented
- # by the 'test-driver' auxiliary script.
+ # test scripts. By default, it's assumed that no protocol is used, so
+ # we fall back to the old behaviour, implemented by the 'test-driver'
+ # auxiliary script.
if (! var "${pfx}LOG_DRIVER")
{
- require_conf_file ($parallel_tests_option->{position}, FOREIGN,
- 'test-driver');
+ require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
define_variable ("${pfx}LOG_DRIVER",
"\$(SHELL) $am_config_aux_dir/test-driver",
INTERNAL);
push (@check_tests, 'check-TESTS');
my $check_deps = "@check";
$output_rules .= &file_contents ('check', new Automake::Location,
- COLOR => !! option 'color-tests',
- PARALLEL_TESTS => !! option 'parallel-tests',
+ SERIAL_TESTS => !! option 'serial-tests',
CHECK_DEPS => $check_deps);
# Tests that are known programs should have $(EXEEXT) appended.
append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
if (var ('XFAIL_TESTS'));
- if (my $parallel_tests = option 'parallel-tests')
+ if (! option 'serial-tests')
{
define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
my $suff = '.test';
if ($val =~ /(\$\((top_)?srcdir\))\//o)
{
msg ('error', $subvar->rdef ($cond)->location,
- "parallel-tests: using '$1' in TESTS is currently broken: '$val'");
+ "using '$1' in TESTS is currently broken: '$val'");
}
foreach my $test_suffix (@test_suffixes)
require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
'EMACS', 'lispdir');
- require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
- &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
}
# Handle Python
AC_REQUIRE_AUX_FILE => 1,
AC_SUBST_TRACE => 1,
AM_AUTOMAKE_VERSION => 1,
- AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.13
+ AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.14
AM_CONDITIONAL => 2,
+ _AM_EXTRA_RECURSIVE_TARGETS => 1,
AM_GNU_GETTEXT => 0,
AM_GNU_GETTEXT_INTL_SUBDIR => 0,
AM_INIT_AUTOMAKE => 0,
AM_MAINTAINER_MODE => 0,
AM_PROG_AR => 0,
AM_PROG_CC_C_O => 0,
- AM_SILENT_RULES => 0,
_AM_SUBST_NOTMAKE => 1,
_AM_COND_IF => 1,
_AM_COND_ELSE => 1,
$seen_automake_version = 1;
}
- elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.13
+ elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.14
{
msg 'obsolete', $where, <<'EOF';
The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
{
$configure_cond{$args[1]} = $where;
}
+ elsif ($macro eq '_AM_EXTRA_RECURSIVE_TARGETS')
+ {
+ push @extra_recursive_targets, split (' ', $args[1]);
+ }
elsif ($macro eq 'AM_GNU_GETTEXT')
{
$seen_gettext = $where;
{
$seen_cc_c_o = $where;
}
- elsif ($macro eq 'AM_SILENT_RULES')
- {
- set_global_option ('silent-rules', $where);
- }
elsif ($macro eq '_AM_COND_IF')
{
cond_stack_if ('', $args[1], $where);
################################################################
-# Set up for Cygnus mode.
-sub check_cygnus
-{
- my $cygnus = option 'cygnus';
- return unless $cygnus;
-
- # This feature is deprecated, will be removed in the next
- # Automake major release.
- msg 'obsolete', $cygnus->get,
- "support for Cygnus-style trees is deprecated";
-
- set_strictness ('foreign');
- set_option ('no-installinfo', $cygnus);
- set_option ('no-dependencies', $cygnus);
- set_option ('no-dist', $cygnus);
-
- err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
- if !$seen_maint_mode;
-}
-
# Do any extra checking for GNU standards.
sub check_gnu_standards
{
sub saw_extension
{
my ($ext) = @_;
- if (! defined $extension_seen{$ext})
- {
- $extension_seen{$ext} = 1;
- }
- else
- {
- ++$extension_seen{$ext};
- }
+ $extension_seen{$ext} = 1;
}
-# Return the number of files seen for a given language. Knows about
-# special cases we care about. FIXME: this is hideous. We need
-# something that involves real language objects. For instance yacc
-# and yaccxx could both derive from a common yacc class which would
-# know about the strange ylwrap requirement. (Or better yet we could
-# just not support legacy yacc!)
-sub count_files_for_language
-{
- my ($name) = @_;
-
- my @names;
- if ($name eq 'yacc' || $name eq 'yaccxx')
- {
- @names = ('yacc', 'yaccxx');
- }
- elsif ($name eq 'lex' || $name eq 'lexxx')
- {
- @names = ('lex', 'lexxx');
- }
- else
- {
- @names = ($name);
- }
-
- my $r = 0;
- foreach $name (@names)
- {
- my $lang = $languages{$name};
- foreach my $ext (@{$lang->extensions})
- {
- $r += $extension_seen{$ext}
- if defined $extension_seen{$ext};
- }
- }
-
- return $r
-}
-
-# Called to ask whether source files have been seen . If HEADERS is 1,
-# headers can be included.
-sub saw_sources_p
-{
- my ($headers) = @_;
-
- # count all the sources
- my $count = 0;
- foreach my $val (values %extension_seen)
- {
- $count += $val;
- }
-
- if (!$headers)
- {
- $count -= count_files_for_language ('header');
- }
-
- return $count > 0;
-}
-
-
# register_language (%ATTRIBUTE)
# ------------------------------
# Register a single language.
# - replaces %KEY% with $VAL,
# - enables/disables ?KEY? and ?!KEY?,
# - replaces %?KEY% with TRUE or FALSE.
-# - replaces %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE% with
-# IFTRUE / IFFALSE, as appropriate.
sub transform ($$)
{
my ($token, $transform) = @_;
{
return transform_token ($token, $transform, $1);
}
- # %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE%.
- elsif ($token =~ /^%([\w\-]+)(?:\?([^?:%]+))?(?::([^?:%]+))?%$/)
- {
- return transform_token ($token, $transform, $1) ? ($2 || '') : ($3 || '');
- }
# %?KEY%.
elsif ($token =~ /^%\?([\w\-]+)%$/)
{
# Complete %transform with global options.
# Note that %transform goes last, so it overrides global options.
- %transform = ('CYGNUS' => !! option 'cygnus',
- 'MAINTAINER-MODE'
+ %transform = ( 'MAINTAINER-MODE'
=> $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
'XZ' => !! option 'dist-xz',
'INSTALL-INFO' => ! option 'no-installinfo',
'INSTALL-MAN' => ! option 'no-installman',
- 'HAVE-MANS' => !! var ('MANS'),
'CK-NEWS' => !! option 'check-news',
'SUBDIRS' => !! var ('SUBDIRS'),
# Substitute Automake template tokens.
s/(?: % \?? [\w\-]+ %
- | % [\w\-]+ (?:\?[^?:%]+)? (?::[^?:%]+)? %
| \? !? [\w\-]+ \?
)/transform($&, \%transform)/gex;
# transform() may have added some ##%-comments to strip.
if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
# Check first, because we might modify some state.
- check_cygnus;
check_gnu_standards;
check_gnits_standards;
handle_data;
handle_headers;
handle_subdirs;
+ handle_user_recursion;
handle_tags;
handle_minor_options;
# Must come after handle_programs so that %known_programs is up-to-date.
--include-deps enable dependency tracking code
Flavors:
- --cygnus assume program is part of Cygnus-style tree
--foreign set strictness to foreign
--gnits set strictness to gnits
--gnu set strictness to gnu
sub parse_arguments ()
{
my $strict = 'gnu';
- my $cygnus = 0;
my $ignore_deps = 0;
my @warnings = ();
'gnu' => sub { $strict = 'gnu'; },
'gnits' => sub { $strict = 'gnits'; },
'foreign' => sub { $strict = 'foreign'; },
- 'cygnus' => \$cygnus,
'include-deps' => sub { $ignore_deps = 0; },
'i|ignore-deps' => sub { $ignore_deps = 1; },
'no-force' => sub { $force_generation = 0; },
set_strictness ($strict);
my $cli_where = new Automake::Location;
- set_global_option ('cygnus', $cli_where) if $cygnus;
set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
for my $warning (@warnings)
{
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
-AC_INIT([GNU Automake], [1.12.4a], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.12a], [bug-automake@gnu.org])
AC_CONFIG_SRCDIR([automake.in])
AC_CONFIG_AUX_DIR([lib])
dnl testsuite, so also use 'no-dependencies' and 'no-define' among
dnl the automake options to avoid bloating and potential problems.
AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests
- parallel-tests silent-rules no-define no-dependencies])
+ no-define no-dependencies])
## Keep this on a line of its own, since it must be found and processed
## by the 'update-copyright' rule in our Makefile.
# $AUTOMAKE and $ACLOCAL are always run after a "cd $top_srcdir",
# hence '.' is really what we want for perllibdir, libdir, and acdir.
-ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
-AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
+# Use '-I' with aclocal so that our own *.m4 files in m4/ gets included,
+# not copied, in aclocal.m4.
+ACLOCAL="\
+ perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" \
+ --automake-acdir=m4 --system-acdir=m4/acdir -I m4"
+AUTOMAKE="\
+ perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" \
+ --libdir=lib"
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
# following tests, but some users were unable to figure out that their
# installation was broken since --version appeared to work.
-required_autoconf_version=2.62
+required_autoconf_version=2.65
AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
[if AM_RUN_LOG([$am_AUTOCONF --version]);
then
## ---------------------- ##
AC_CONFIG_FILES([Makefile])
-
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
-AC_CONFIG_LINKS([defs:defs])
AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in],
[chmod +x t/wrap/aclocal-${APIVERSION}],
rm -f $(TEST_SUITE_HTML)
.log.html:
- @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
- for r2h in $$list; do \
- if ($$r2h --version) >/dev/null 2>&1; then \
- R2H=$$r2h; \
- fi; \
- done; \
- if test -z "$$R2H"; then \
- echo >&2 "cannot find rst2html, cannot create $@"; \
+ @list='$(RST2HTML) rst2html rst2html.py'; \
+ while :; do \
+ for r2h in $$list; do \
+ if ($$r2h --version) >/dev/null 2>&1; then break 2; \
+ else :; fi; \
+ done; \
+ echo "cannot find rst2html, cannot create $@" >&2; \
exit 2; \
- fi; \
- $$R2H $< >$@.tmp
- @mv $@.tmp $@
+ done; \
+ $$r2h $(AM_RST2HTMLFLAGS) $(RST2HTMLFLAGS) $< >$@-t \
+ && mv -f $@-t $@
# Be sure to run check first, and then to convert the result.
# Beware of concurrent executions. Run "check" not "check-TESTS", as
# Make sure that our macro 'AM_ENABLE_MULTILIB' adds proper text to
# the configure help screen.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
-#!/bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
-#
+# Copyright (C) 1995-2012 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that automake complaints if the 'silent-rules' option is
-# used in AUTOMAKE_OPTIONS.
-
-. ./defs || exit 1
-
-echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
+# Automake: tests for stuff in 'contrib/'.
-$ACLOCAL
-AUTOMAKE_fails
-grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
+## Relative to the top-level directory.
+contrib_testsuite_dir = contrib/t
-:
+contrib_TESTS = \
+ $(contrib_testsuite_dir)/parallel-tests-html.sh \
+ $(contrib_testsuite_dir)/parallel-tests-html-recursive.sh \
+ $(contrib_testsuite_dir)/help-multilib.sh \
+ $(contrib_testsuite_dir)/multilib.sh
# Check multilib support.
# Based on a test case from Ralf Corsepius.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
required='gcc GNUmake'
-. ./defs || exit 1
+. test-init.sh
mldir=$am_top_srcdir/contrib/multilib
mkdir m4
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Recursive use of 'check-html'. See Automake bug#11287.
+
+. test-init.sh
+
+# Try the variants that are tried in check-html.am.
+while :; do
+ for r2h in $RST2HTML rst2html rst2html.py; do
+ echo "$me: running $r2h --version"
+ $r2h --version && break 2
+ : For shells with busted 'set -e'.
+ done
+ skip_all_ "no proper rst2html program found"
+done
+unset r2h
+
+cp "$am_top_srcdir"/contrib/check-html.am . \
+ || fatal_ "cannot fetch 'check-html.am' from contrib"
+
+cat >> configure.ac << 'END'
+AM_EXTRA_RECURSIVE_TARGETS([check-html])
+AC_CONFIG_FILES([sub/Makefile sub/more/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+EXTRA_DIST = $(TESTS)
+TEST_SUITE_LOG = mylog.log
+TESTS = foo.test bar.sh mu
+XFAIL_TESTS = bar.sh
+check_SCRIPTS = bla
+bla:
+ echo '#!/bin/sh' > $@-t
+ echo 'echo Blah Blah Blah' >> $@-t
+ chmod a+x,a-w $@-t
+ mv -f $@-t $@
+CLEANFILES = bla
+include $(srcdir)/check-html.am
+END
+
+mkdir sub
+echo SUBDIRS = more > sub/Makefile.am
+
+mkdir sub/more
+cat > sub/more/Makefile.am << 'END'
+include $(top_srcdir)/check-html.am
+TEST_EXTENSIONS = .test .sh
+TESTS = sh.sh test.test
+LOG_COMPILER = true
+test.log: sh.log
+nodist_check_DATA = x.txt
+$(nodist_check_DATA):
+ echo $@ > $@
+CLEANFILES = $(nodist_check_DATA)
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+./bla
+exit 77
+END
+
+cat > bar.sh <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 1
+END
+
+cat > mu <<'END'
+#! /bin/sh
+set -x
+test -f sub/more/test.log
+test -f sub/more/sh.log
+END
+
+cat > sub/more/test.test << 'END'
+#!/bin/sh
+echo "this is $0"
+set -x
+test -f sh.log
+test -f x.txt
+exit 77
+END
+
+cat > sub/more/sh.sh << 'END'
+#!/bin/sh
+set -x
+test ! -f test.log
+test -f x.txt
+END
+
+
+cat > sub/more/mu << 'END'
+#!/bin/sh
+exit 99
+END
+
+chmod a+x foo.test bar.sh mu sub/more/test.test sub/more/sh.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check-html
+grep 'Blah Blah Blah' mylog.html
+grep 'this is .*bar\.sh' mylog.html
+grep 'this is .*test\.test' sub/more/test-suite.html
+# check-html should cause check_SCRIPTS and check_DATA to be created.
+test -f bla
+test -f sub/more/x.txt
+
+# "make clean" should remove HTML files.
+$MAKE clean
+test ! -e mylog.html
+test ! -e sub/more/test-suite.html
+test ! -e bla
+test ! -e sub/more/x.txt
+
+# Create HTML output for individual tests.
+
+$MAKE bla
+$MAKE foo.html bar.sh.html
+grep 'Blah Blah Blah' foo.html
+grep 'this is .*bar\.sh' bar.sh.html
+test ! -e mu.hml
+
+ocwd=$(pwd) || fatal_ "getting current workind directory"
+( cd sub/more \
+ && $MAKE sh.html \
+ && test -f sh.html \
+ && test ! -e test.html \
+ && $MAKE test.html \
+ && grep 'this is .*test\.test' test.html) || exit 1
+
+# HTML output removed by mostlyclean.
+$MAKE check-html
+test -f mylog.html
+test -f sub/more/test-suite.html
+$MAKE mostlyclean
+find . -name '*.html' | grep . && exit 1
+
+$MAKE distcheck
+
+:
# Check parallel-tests features:
# - check-html
# - recheck-html
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
-. ./defs || exit 1
+. test-init.sh
# Try the variants that are tried in check-html.am.
while :; do
+++ /dev/null
-# -*- shell-script -*-
-#
-# Copyright (C) 1996-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# This file is here for backward-compatibility with the existing
-# tests still unconverted to the use of 'test-init.sh'. It should
-# eventually be removed, once all the tests have been converted.
-
-. test-init.sh
* Conditionals:: Conditionals
* Silencing Make:: Obtain less verbose output from @command{make}
* Gnits:: The effect of @option{--gnu} and @option{--gnits}
-* Cygnus:: The effect of @option{--cygnus} (deprecated, soon to be removed)
* Not Enough:: When Automake is not Enough
* Distributing:: Distributing the Makefile.in
* API Versioning:: About compatibility between Automake versions
Autoconf macros supplied with Automake
* Public Macros:: Macros that you can use.
-* Obsolete Macros:: Macros that will soon be removed.
* Private Macros:: Macros that you should not use.
Directories
Silencing Make
-* Make verbosity:: Make is verbose by default
-* Tricks For Silencing Make:: Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity:: Make is verbose by default
+* Tricks For Silencing Make:: Standard and generic ways to silence make
+* Automake Silent Rules:: How Automake can help in silencing make
When Automake Isn't Enough
@xref{Gnits}, for more information on the precise implications of the
strictness level.
-Automake also has a special (and @emph{today deprecated}) ``cygnus'' mode
-that is similar to strictness but handled differently. This mode is
-useful for packages that are put into a ``Cygnus'' style tree (e.g., older
-versions of the GCC and gdb trees). @xref{Cygnus}, for more information
-on this mode. Please note that this mode @emph{is deprecated and will be
-removed in the next major Automake release (1.13)}; you must avoid its use
-in new packages, and should stop using it in existing packages as well.
-
@node Uniform
@section The Uniform Naming Scheme
that is then used by the automatic dependency tracking feature
(@pxref{Dependencies}).
-@item elisp-comp
-This program is used to byte-compile Emacs Lisp code.
-
@item install-sh
This is a replacement for the @command{install} program that works on
platforms where @command{install} is unavailable or unusable.
@item missing
This wraps a number of programs that are typically only required by
-maintainers. If the program in question doesn't exist,
-@command{missing} prints an informative warning and attempts to fix
-things so that the build can continue.
+maintainers. If the program in question doesn't exist, or seems to old,
+@command{missing} will print an informative warning before failing out,
+to provide the user with more context and information.
@item mkinstalldirs
This script used to be a wrapper around @samp{mkdir -p}, which is not
When used with @option{--add-missing}, causes installed files to be
copied. The default is to make a symbolic link.
-@item --cygnus
-@opindex --cygnus
-Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead
-of GNU or Gnits rules. For more information, see @ref{Cygnus}.
-Note that @emph{this mode of operation is deprecated, and will be removed}
-in the next major Automake release (1.13).
-
@item -f
@opindex -f
@itemx --force-missing
The categories output by default are @samp{obsolete}, @samp{syntax} and
@samp{unsupported}. Additionally, @samp{gnu} and @samp{portability}
are enabled in @option{--gnu} and @option{--gnits} strictness.
-On the other hand, the @option{silent-rules} options (@pxref{Options})
-turns off portability warnings about recursive variable expansions.
@c Checked by extra-portability.sh
Turning off @samp{portability} will also turn off @samp{extra-portability},
@file{config.guess},
@file{config.sub},
@file{depcomp},
-@file{elisp-comp},
@file{compile},
@file{install-sh},
@file{ltmain.sh},
@item AC_CONFIG_HEADERS
Automake will generate rules to rebuild these headers from the
corresponding templates (usually, the template for a @file{foo.h}
-header being @file{foo.h.in}). Older versions of Automake required
-the use of @code{AM_CONFIG_HEADER} (@pxref{Macros}); this is no
-longer the case.
+header being @file{foo.h.in}). Older versions of Automake
+required the use of @code{AM_CONFIG_HEADER}; this is no longer
+the case, and that macro has indeed been removed.
As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
specification using shell variables will be ignored as far as
numerous macros, it will rapidly become difficult to maintain, and it
will be almost impossible to share macros between packages.
-@vindex ACLOCAL_AMFLAGS
The second possibility, which we do recommend, is to write each macro
-in its own file and gather all of these files in a directory. This
-directory is usually called @file{m4/}. To build @file{aclocal.m4},
-one should therefore instruct @command{aclocal} to scan @file{m4/}.
-From the command line, this is done with @samp{aclocal -I m4}. The
-top-level @file{Makefile.am} should also be updated to define
-
-@example
-ACLOCAL_AMFLAGS = -I m4
-@end example
-
-@code{ACLOCAL_AMFLAGS} contains options to pass to @command{aclocal}
-when @file{aclocal.m4} is to be rebuilt by @command{make}. This line is
-also used by @command{autoreconf} (@pxref{autoreconf Invocation, ,
-Using @command{autoreconf} to Update @file{configure} Scripts,
-autoconf, The Autoconf Manual}) to run @command{aclocal} with suitable
-options, or by @command{autopoint} (@pxref{autopoint Invocation, ,
-Invoking the @command{autopoint} Program, gettext, GNU gettext tools})
-and @command{gettextize} (@pxref{gettextize Invocation, , Invoking the
-@command{gettextize} Program, gettext, GNU gettext tools}) to locate
-the place where Gettext's macros should be installed. So even if you
-do not really care about the rebuild rules, you should define
-@code{ACLOCAL_AMFLAGS}.
-
-When @samp{aclocal -I m4} is run, it will build an @file{aclocal.m4}
+in its own file and gather all these files in a directory. This
+directory is usually called @file{m4/}. Then it's enough to update
+@file{configure.ac} by adding a proper call to @code{AC_CONFIG_MACRO_DIR}:
+
+@example
+AC_CONFIG_MACRO_DIR([m4])
+@end example
+
+@command{aclocal} will then take care of automatically adding @file{m4/}
+to its search path for m4 files.
+
+When @samp{aclocal} is run, it will build an @file{aclocal.m4}
that @code{m4_include}s any file from @file{m4/} that defines a
required macro. Macros not found locally will still be searched in
system-wide directories, as explained in @ref{Macro Search Path}.
such third-party macros in your local @file{m4/} directory so they get
distributed.
-Since Automake 1.10, @command{aclocal} offers an option to copy these
-system-wide third-party macros in your local macro directory, solving
-the above problem. Simply use:
-
-@example
-ACLOCAL_AMFLAGS = -I m4 --install
-@end example
+Since Automake 1.10, @command{aclocal} offers the option @code{--install}
+to copy these system-wide third-party macros in your local macro directory,
+helping to solve the above problem.
-@noindent
With this setup, system-wide macros will be copied to @file{m4/}
-the first time you run @command{autoreconf}. Then the locally
-installed macros will have precedence over the system-wide installed
-macros each time @command{aclocal} is run again.
+the first time you run @command{aclocal}. Then the locally installed
+macros will have precedence over the system-wide installed macros
+each time @command{aclocal} is run again.
One reason why you should keep @option{--install} in the flags even
after the first run is that when you later edit @file{configure.ac}
explained in @ref{Local Macros}, and has
@example
-ACLOCAL_AMFLAGS = -I m4 --install
+AC_CONFIG_MACRO_DIR([m4])
@end example
@noindent
-in its top-level @file{Makefile.am}.
+in its @file{configure.ac}.
Initially the @file{m4/} directory is empty. The first time we run
-@command{autoreconf}, it will fetch the options to pass to
-@command{aclocal} in @file{Makefile.am}, and run @samp{aclocal -I m4
---install}. @command{aclocal} will notice that
+@command{aclocal --install}, it will notice that
@itemize @bullet
@item
copy this file in @file{m4/thirdparty.m4}, and output an
@file{aclocal.m4} that contains @samp{m4_include([m4/thirdparty.m4])}.
-The next time @samp{aclocal -I m4 --install} is run (either via
-@command{autoreconf}, by hand, or from the @file{Makefile} rebuild
-rules) something different happens. @command{aclocal} notices that
+The next time @samp{aclocal --install} is run, something different
+happens. @command{aclocal} notices that
@itemize @bullet
@item
Now suppose the system-wide third-party macro is changed. This can
happen if the package installing this macro is updated. Let's suppose
-the new macro has serial number 2. The next time @samp{aclocal -I m4
---install} is run the situation is the following:
+the new macro has serial number 2. The next time @samp{aclocal --install}
+is run the situation is the following:
@itemize @bullet
@item
version. MyPackage just had its macro updated as a side effect of
running @command{aclocal}.
-If you are leery of letting @command{aclocal} update your local macro,
-you can run @samp{aclocal -I m4 --diff} to review the changes
-@samp{aclocal -I m4 --install} would perform on these macros.
+If you are leery of letting @command{aclocal} update your local
+macro, you can run @samp{aclocal --diff} to review the changes
+@samp{aclocal --install} would perform on these macros.
Finally, note that the @option{--force} option of @command{aclocal} has
absolutely no effect on the files installed by @option{--install}. For
instance, if you have modified your local macros, do not expect
@option{--install --force} to replace the local macros by their
system-wide versions. If you want to do so, simply erase the local
-macros you want to revert, and run @samp{aclocal -I m4 --install}.
+macros you want to revert, and run @samp{aclocal --install}.
@node Future of aclocal
Runs many macros required for proper operation of the generated Makefiles.
@vindex AUTOMAKE_OPTIONS
-Today, @code{AM_INIT_AUTOMAKE} is called with a single argument: a
-space-separated list of Automake options that should
-be applied to every @file{Makefile.am} in the tree. The effect is as if
-each option were listed in @code{AUTOMAKE_OPTIONS} (@pxref{Options}).
+@code{AM_INIT_AUTOMAKE} is called with a single argument: a space-separated
+list of Automake options that should be applied to every @file{Makefile.am}
+in the tree. The effect is as if each option were listed in
+@code{AUTOMAKE_OPTIONS} (@pxref{Options}).
+
+@c FIXME: Remove this "modernization advice" in Automake 1.14 (and adjust
+@c FIXME: the error message in m4/init.m4:AM_INIT_AUTOMAKE accordingly).
@acindex AC_INIT
-This macro can also be called in @emph{another, deprecated form} (support
-for which will be @emph{removed in the next major Automake release (1.13)}):
+This macro could once (before Automake 1.13) also be called in the
+@emph{now obsolete and completely unsupported} form
@code{AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])}. In this form,
-there are two required arguments: the package and the version number.
-This form is obsolete because the @var{package} and @var{version} can
-be obtained from Autoconf's @code{AC_INIT} macro (which itself has an
-old and a new form).
+there were two required arguments: the package and the version number.
@anchor{Modernize AM_INIT_AUTOMAKE invocation}
If your @file{configure.ac} has:
@end example
@noindent
-you should modernize it as follows:
+you must modernize it as follows in order to make it work with Automake
+1.13 or later:
@example
AC_INIT([mumble], [1.5])
@item AM_SILENT_RULES
@acindex AM_SILENT_RULES
-Enable the machinery for less verbose build output (@pxref{Options}).
+Control the machinery for less verbose build output
+(@pxref{Automake Silent Rules}).
@item AM_WITH_DMALLOC
@acindex AM_WITH_DMALLOC
@table @code
-@item AM_CONFIG_HEADER
-@acindex AM_CONFIG_HEADER
-Automake will generate rules to automatically regenerate the config
-header. This obsolete macro is a synonym of @code{AC_CONFIG_HEADERS}
-today (@pxref{Optional}).
-
-@item AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-@acindex AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then
-define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be
-found in @file{<termios.h>}. This macro is obsolete, you should
-use Autoconf's @code{AC_HEADER_TIOCGWINSZ} instead.
-
@item AM_PROG_MKDIR_P
@acindex AM_PROG_MKDIR_P
@cindex @code{mkdir -p}, macro check
interface instead; both the macro and the variable @emph{will be
removed} in the next major Automake release.
-@item AM_SYS_POSIX_TERMIOS
-@acindex AM_SYS_POSIX_TERMIOS
-@cindex POSIX termios headers
-@cindex termios POSIX headers
-Check to see if POSIX termios headers and functions are available on the
-system. If so, set the shell variable @code{am_cv_sys_posix_termios} to
-@samp{yes}. If not, set the variable to @samp{no}. This macro is obsolete,
-you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
-
@end table
built after everything else since they are meant to test what has
been constructed.
+In addition to the built-in recursive targets defined by Automake
+(@code{all}, @code{check}, etc.), the developer can also define his
+own recursive targets. That is done by passing the names of such
+targets as arguments to the m4 macro @code{AM_EXTRA_RECURSIVE_TARGETS}
+in @file{configure.ac}. Automake generates rules to handle the
+recursion for such targets; and the developer can define real actions
+for them by defining corresponding @code{-local} targets.
+
+@example
+% @kbd{cat configure.ac}
+AC_INIT([pkg-name], [1.0]
+AM_INIT_AUTOMAKE
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([Makefile sub/Makefile sub/src/Makefile])
+AC_OUTPUT
+% @kbd{cat Makefile.am}
+SUBDIRS = sub
+foo-local:
+ @@echo This will be run by "make foo".
+% @kbd{cat sub/Makefile.am}
+SUBDIRS = src
+% @kbd{cat sub/src/Makefile.am}
+foo-local:
+ @@echo This too will be run by a "make foo" issued either in
+ @@echo the 'sub/src/' directory, the 'sub/' directory, or the
+ @@echo top-level directory.
+@end example
+
@node Conditional Subdirectories
@section Conditional Subdirectories
@cindex Subdirectories, building conditionally
not be set in @file{Makefile.am}: this is a user variable (@pxref{Flag
Variables Ordering}. It allows users to run @samp{make
LIBTOOLFLAGS=--silent}, for instance. Note that the verbosity of
-@command{libtool} can also be influenced with the Automake
-@option{silent-rules} option (@pxref{Options}).
-
+@command{libtool} can also be influenced by the Automake support
+for silent rules (@pxref{Automake Silent Rules}).
@node LTLIBOBJS, Libtool Issues, Libtool Flags, A Shared Library
@subsection @code{LTLIBOBJS} and @code{LTALLOCA}
separate variable that is also passed to every compilation that invokes
the C preprocessor. In particular it generates @samp{-I.},
@samp{-I$(srcdir)}, and a @option{-I} pointing to the directory holding
-@file{config.h} (if you've used @code{AC_CONFIG_HEADERS} or
-@code{AM_CONFIG_HEADER}). You can disable the default @option{-I}
-options using the @option{nostdinc} option.
+@file{config.h} (if you've used @code{AC_CONFIG_HEADERS}). You can
+disable the default @option{-I} options using the @option{nostdinc}
+option.
When a file to be included is generated during the build and not part
of a distribution tarball, its location is under @code{$(builddir)},
distributed.
Automake will byte-compile all Emacs Lisp source files using the Emacs
-found by @code{AM_PATH_LISPDIR}, if any was found.
+found by @code{AM_PATH_LISPDIR}, if any was found. When performing such
+byte-compilation, the flags specified in the (developer-reserved)
+@code{AM_ELCFLAGS} and (user-reserved) @code{ELCFLAGS} make variables
+will be passed to the Emacs invocation.
Byte-compiled Emacs Lisp files are not portable among all versions of
Emacs, so it makes sense to turn this off if you expect sites to have
different means (the so-called ``log compilers'', @pxref{Parallel Test
Harness}).
-Test scripts can be executed serially or concurrently. Automake
-supports both these kinds of test execution, with the serial test harness
-being the default (for backward-compatibility reasons only, as its use
-is nowadays discouraged). The concurrent test harness relies on the
-concurrence capabilities (if any) offered by the underlying @command{make}
+Test scripts can be executed serially or concurrently. Automake supports
+both these kinds of test execution, with the parallel test harness being
+the default. The concurrent test harness relies on the concurrence
+capabilities (if any) offered by the underlying @command{make}
implementation, and can thus only be as good as those are.
By default, only the exit statuses of the test scripts are considered when
determining the testsuite outcome. But Automake allows also the use of
more complex test protocols, either standard (@pxref{Using the TAP test
-protocol}) or custom (@pxref{Custom Test Drivers}). Note that you can
-enable such protocols only when the parallel harness is used: they won't
-work with the serial test harness. In the rest of this section we are
-going to concentrate mostly on protocol-less tests, since we cover
-test protocols in a later section (again, @pxref{Custom Test Drivers}).
+protocol}) or custom (@pxref{Custom Test Drivers}). Note that you can't
+enable such protocols when the serial harness is used, though.
+In the rest of this section we are going to concentrate mostly on
+protocol-less tests, since we cover test protocols in a later section
+(again, @pxref{Custom Test Drivers}).
@cindex Exit status 77, special interpretation
@cindex Exit status 99, special interpretation
@anchor{Simple tests and color-tests}
@vindex AM_COLOR_TESTS
@cindex Colorized testsuite output
-If the Automake option @code{color-tests} is used (@pxref{Options})
-and standard output is connected to a capable terminal, then the test
-results and the summary are colored appropriately. The user can disable
-colored output by setting the @command{make} variable
-@samp{AM_COLOR_TESTS=no}, or force colored output even without a connecting
-terminal with @samp{AM_COLOR_TESTS=always}. It's also worth noting that
-some @command{make} implementations, when used in parallel mode, have
-slightly different semantics (@pxref{Parallel make,,, autoconf,
-The Autoconf Manual}), which can break the automatic detection of a
-connection to a capable terminal. If this is the case, you'll have to
-resort to the use of @samp{AM_COLOR_TESTS=always} in order to have the
-testsuite output colorized.
+If the standard output is connected to a capable terminal, then the test
+results and the summary are colored appropriately. The developer and the
+user can disable colored output by setting the @command{make} variable
+@samp{AM_COLOR_TESTS=no}; the user can in addition force colored output
+even without a connecting terminal with @samp{AM_COLOR_TESTS=always}.
+It's also worth noting that some @command{make} implementations,
+when used in parallel mode, have slightly different semantics
+(@pxref{Parallel make,,, autoconf, The Autoconf Manual}), which can
+break the automatic detection of a connection to a capable terminal.
+If this is the case, the user will have to resort to the use of
+@samp{AM_COLOR_TESTS=always} in order to have the testsuite output
+colorized.
Test programs that need data files should look for them in @code{srcdir}
(which is both a make variable and an environment variable made available
@code{TESTS = $(check_PROGRAMS)} if all your programs are test cases.
@node Serial Test Harness
-@subsection Serial Test Harness
+@subsection Older (and obsolescent) serial test harness
@cindex @option{serial-tests}, Using
-@emph{NOTE:} This harness, while still being the default one, is
-obsolescent, and kept mostly for backward-compatibility reasons. The user
-is advised to use the parallel test harness instead (@pxref{Parallel Test
-Harness}). Be warned that future Automake versions might switch to use
-that more modern and feature-rich harness by default.
+@emph{This harness is obsolescent}, and kept for backward-compatibility
+reasons only. The user is strongly advised to just use the parallel test
+harness instead (@pxref{Parallel Test Harness}).
The serial test harness is enabled by the Automake option
@option{serial-tests}. It operates by simply running the tests serially,
@node Parallel Test Harness
@subsection Parallel Test Harness
-@cindex @option{parallel-tests}, Using
-The parallel (or concurrent) test harness is enabled by the Automake option
-@option{parallel-tests}. It features automatic collection of the test
-scripts output in @file{.log} files, concurrent execution of tests with
-@code{make -j}, specification of inter-test dependencies, lazy reruns of
-tests that have not completed in a prior run, and hard errors for exceptional
-failures.
+By default, Automake generated a parallel (concurrent) test harness. It
+features automatic collection of the test scripts output in @file{.log}
+files, concurrent execution of tests with @code{make -j}, specification
+of inter-test dependencies, lazy reruns of tests that have not completed
+in a prior run, and hard errors for exceptional failures.
This harness is still somewhat experimental and may undergo changes in
order to satisfy additional portability requirements.
@end itemize
@noindent
-On the other hand, the exact semantics of how (and if)
-@option{color-tests}, @code{XFAIL_TESTS}, and hard errors are supported
-and handled is left to the individual test drivers.
+On the other hand, the exact semantics of how (and if) testsuite output
+colorization, @code{XFAIL_TESTS}, and hard errors are supported and
+handled is left to the individual test drivers.
@c TODO: We should really add a working example in the doc/ directory,
@c TODO: and reference if from here.
@subsubsection Command-line arguments for test drivers
A custom driver can rely on various command-line options and arguments
-being passed to it automatically by the Automake's @option{parallel-tests}
-harness. It is @emph{mandatory} that it understands all of them (even
-if the exact interpretation of the associated semantics can legitimately
-change between a test driver and another, and even be a no-op in some
-drivers).
+being passed to it automatically by the Automake-generated test harness.
+It is @emph{mandatory} that it understands all of them (even if the exact
+interpretation of the associated semantics can legitimately change
+between a test driver and another, and even be a no-op in some drivers).
@noindent
Here is the list of options:
Note that the exact semantics attached to the @option{--color-tests},
@option{--expect-failure} and @option{--enable-hard-errors} options are
left up to the individual test drivers. Still, having a behaviour
-compatible or at least similar to that provided by the default
-@option{parallel-tests} driver is advised, as that would offer a better
-consistency and a more pleasant user experience.
+compatible or at least similar to that provided by the default driver
+is advised, as that would offer a better consistency and a more pleasant
+user experience.
@node Log files generation and test results recording
@subsubsection Log files generation and test results recording
@code{SKIP}, @code{FAIL}, @code{XPASS} and @code{ERROR}. These results,
when declared with @code{:test-result:}, can be optionally followed by
text holding the name and/or a brief description of the corresponding
-test; the @option{parallel-tests} harness will ignore such extra text when
-generating @file{test-suite.log} and preparing the testsuite summary.
+test; the harness will ignore such extra text when generating
+@file{test-suite.log} and preparing the testsuite summary.
@c Keep in sync with 'test-metadata-recheck.sh'.
@item @code{:recheck:}
parse and interpret these results, and properly present them to the user,
and/or register them for later analysis. The exact details of how this
is accomplished can vary among different test harnesses. The Automake
-parallel harness will present the results on the console in the usual
+harness will present the results on the console in the usual
fashion (@pxref{Testsuite progress on console}), and will use the
@file{.trs} files (@pxref{Basics of test metadata}) to store the test
results and related metadata. Apart from that, it will try to remain
% @kbd{cat configure.ac}
AC_INIT([GNU Try Tap], [1.0], [bug-automake@@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
A @code{Bail out!} directive doesn't stop the whole testsuite, but only
the test script it occurs in. This doesn't follow TAP specifications,
but on the other hand it maximizes compatibility (and code sharing) with
-the ``hard error'' concept of the default @option{parallel-tests} driver.
+the ``hard error'' concept of the default testsuite driver.
@item
The @code{version} and @code{pragma} directives are not supported.
@item
If you are using @code{AM_MAINTAINER_MODE} in @file{configure.ac}, then
these automatic rebuilding rules are only enabled in maintainer mode.
-@vindex ACLOCAL_AMFLAGS
-Sometimes you need to run @command{aclocal} with an argument like
-@option{-I} to tell it where to find @file{.m4} files. Since
-sometimes @command{make} will automatically run @command{aclocal}, you
-need a way to specify these arguments. You can do this by defining
-@code{ACLOCAL_AMFLAGS}; this holds arguments that are passed verbatim
-to @command{aclocal}. This variable is only useful in the top-level
-@file{Makefile.am}.
-
@vindex CONFIG_STATUS_DEPENDENCIES
@vindex CONFIGURE_DEPENDENCIES
@cindex @file{version.sh}, example
in the example above.
Speaking of @file{version.sh} scripts, we recommend against them
-today. They are mainly used when the version of a package is updated
-automatically by a script (e.g., in daily builds). Here is what some
-old-style @file{configure.ac}s may look like:
-
-@example
-AC_INIT
-. $srcdir/version.sh
-AM_INIT_AUTOMAKE([name], $VERSION_NUMBER)
-@dots{}
-@end example
-
-@noindent
-Here, @file{version.sh} is a shell fragment that sets
-@code{VERSION_NUMBER}. The problem with this example is that
-@command{automake} cannot track dependencies (listing @file{version.sh}
-in @command{CONFIG_STATUS_DEPENDENCIES}, and distributing this file is up
-to the user), and that it uses the obsolete form of @code{AC_INIT} and
-@code{AM_INIT_AUTOMAKE}. Upgrading to the new syntax is not
-straightforward, because shell variables are not allowed in
-@code{AC_INIT}'s arguments. We recommend that @file{version.sh} be
-replaced by an M4 file that is included by @file{configure.ac}:
+today. We recommend that @file{version.sh} be replaced by an M4 file
+that is included by @file{configure.ac}:
@example
m4_include([version.m4])
@samp{m4_define([VERSION_NUMBER], [1.2])}. The advantage of this
second form is that @command{automake} will take care of the
dependencies when defining the rebuild rule, and will also distribute
-the file automatically. An inconvenience is that @command{autoconf}
-will now be rerun each time the version number is bumped, when only
-@file{configure} had to be rerun in the previous setup.
+the file automatically.
@node Options
@item @option{gnits}
@itemx @option{gnu}
@itemx @option{foreign}
-@itemx @option{cygnus}
@cindex Option, @option{gnits}
@cindex Option, @option{gnu}
@cindex Option, @option{foreign}
-@cindex Option, @option{cygnus}
@opindex gnits
@opindex gnu
@opindex foreign
-@opindex cygnus
Set the strictness as appropriate. The @option{gnits} option also
implies options @option{readme-alpha} and @option{check-news}.
Cause @samp{make dist} to fail unless the current version number appears
in the first few lines of the @file{NEWS} file.
-@item @option{color-tests}
-@cindex Option, @option{color-tests}
-@opindex color-tests
-Cause output of the serial and parallel test harnesses (see @ref{Simple
-Tests}) and of properly-written custom test drivers (@pxref{Custom Test
-Drivers}) to be colorized on capable terminals.
-
@item @option{dejagnu}
@cindex Option, @option{dejagnu}
@opindex dejagnu
Don't require @file{texinfo.tex}, even if there are texinfo files in
this directory.
-@item @option{parallel-tests}
-@cindex Option, @option{parallel-tests}
-@opindex parallel-tests
-Enable test suite harness for @code{TESTS} that can run tests in parallel
-(@pxref{Parallel Test Harness}, for more information).
-
@item @option{serial-tests}
@cindex Option, @option{serial-tests}
@opindex serial-tests
Enable the older serial test suite harness for @code{TESTS} (@pxref{Serial
-Test Harness}, for more information). This is still the default for the
-moment.
+Test Harness}, for more information).
+
+@item @option{parallel-tests}
+@cindex Option, @option{parallel-tests}
+@opindex parallel-tests
+Enable test suite harness for @code{TESTS} that can run tests in parallel
+(@pxref{Parallel Test Harness}, for more information). This option is
+only kept for backward-compatibility, since the parallel test harness is
+the default now.
@item @option{readme-alpha}
@cindex Option, @option{readme-alpha}
@samp{@var{major}.@var{minor}@var{alpha}}, where @var{alpha} is a
letter; it should be omitted for non-alpha releases.
-@item @option{silent-rules}
-@cindex Option, @option{silent-rules}
-@opindex silent-rules
-Enable less verbose build rules. This can be used to let build rules
-output status lines of the form:
-@example
-GEN @var{output-file}
- CC @var{object-file}
-@end example
-@noindent
-instead of printing the command that will be executed to update
-@var{output-file} or to compile @var{object-file}. It can also
-silence @command{libtool} output.
-
-For more information about how to use, enable, or disable silent
-rules, @pxref{Automake silent-rules Option}.
-
@item @option{std-options}
@cindex Options, @option{std-options}
@cindex @samp{make installcheck}, testing @option{--help} and @option{--version}
@cindex Silent @command{make} rules
@menu
-* Make verbosity:: Make is verbose by default
-* Tricks For Silencing Make:: Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity:: Make is verbose by default
+* Tricks For Silencing Make:: Standard and generic ways to silence make
+* Automake Silent Rules:: How Automake can help in silencing make
@end menu
@node Make verbosity
Here we describe some common idioms/tricks to obtain a quieter make
output, with their relative advantages and drawbacks. In the next
-section (@ref{Automake silent-rules Option}) we'll see how Automake
-can help in this respect.
+section (@ref{Automake Silent Rules}) we'll see how Automake can help
+in this respect, providing more elaborate and flexible idioms.
@itemize @bullet
@end itemize
-@node Automake silent-rules Option
+@node Automake Silent Rules
@section How Automake can help in silencing make
The tricks and idioms for silencing @command{make} described in the
previous section can be useful from time to time, but we've seen that
they all have their serious drawbacks and limitations. That's why
automake provides support for a more advanced and flexible way of
-obtaining quieter output from @command{make}: the @option{silent-rules}
-mode.
+obtaining quieter output from @command{make} (for most rules at least).
@c TODO: Maybe describe in brief the precedent set by the build system
@c of the Linux Kernel, from which Automake took inspiration ... Links?
-To give the gist of what @option{silent-rules} can do, here is a simple
+To give the gist of what Automake can do in this respect, here is a simple
comparison between a typical @command{make} output (where silent rules
are disabled) and one with silent rules enabled:
CCLD foo
@end example
-@cindex silent-rules and libtool
+@cindex silent rules and libtool
Also, in projects using @command{libtool}, the use of silent rules can
automatically enable the @command{libtool}'s @option{--silent} option:
CCLD libx.la
@end example
-Let's now see how the @option{silent-rules} mode interfaces with the
-package developer and the package user.
-
-To enable the use of @option{silent-rules} in his package, a developer
-needs to do either of the following:
-
-@itemize @bullet
-@item
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
-@item
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
-@end itemize
-
-It is not possible to instead specify @option{silent-rules} in a
-@file{Makefile.am} file.
-
-If the developer has done either of the above, then the user of the
-package may influence the verbosity at @command{configure} run time as
-well as at @command{make} run time:
+For Automake-generated @file{Makefile}s, the user may influence the
+verbosity at @command{configure} run time as well as at @command{make}
+run time:
@itemize @bullet
@item
@code{make V=0} less verbose output.
@end itemize
-@cindex default verbosity for silent-rules
+@cindex default verbosity for silent rules
Note that silent rules are @emph{disabled} by default; the user must
enable them explicitly at either @command{configure} run time or at
@command{make} run time. We think that this is a good policy, since
it provides the casual user with enough information to prepare a good
bug report in case anything breaks.
-Still, notwithstanding the rationales above, a developer who wants to
-make silent rules enabled by default in his own package can do so by
-adding a @samp{yes} argument to the @code{AM_SILENT_RULES} call in
-@file{configure.ac}. We advise against this approach, though.
+Still, notwithstanding the rationales above, a developer who really
+wants to make silent rules enabled by default in his own package can
+do so by calling @code{AM_SILENT_RULES([yes])} in @file{configure.ac}.
@c Keep in sync with silent-configsite.sh
Users who prefer to have silent rules enabled by default can edit their
are advised to not set the variable @code{V} inside the @file{Makefile.am}
file, to allow the user to override the value for subdirectories as well.
-The current implementation of this feature normally uses nested
-variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile} feature
-that is not required by POSIX 2008 but is widely supported in
-practice. The @option{silent-rules} option thus turns off warnings
-about recursive variable expansion, which are in turn enabled by
-@option{-Wportability} (@pxref{automake Invocation}). On the rare
-@command{make} implementations that do not support nested variable
-expansion, whether rules are silent is always determined at configure
-time, and cannot be overridden at make time. Future versions of POSIX
-are likely to require nested variable expansion, so this minor
+To work at its best, the current implementation of this feature normally
+uses nested variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile}
+feature that is not required by POSIX 2008 but is widely supported in
+practice. On the rare @command{make} implementations that do not support
+nested variable expansion, whether rules are silent is always determined at
+configure time, and cannot be overridden at make time. Future versions of
+POSIX are likely to require nested variable expansion, so this minor
limitation should go away with time.
@vindex @code{AM_V_GEN}
@end itemize
-@node Cygnus
-@chapter The effect of @option{--cygnus}
-
-@cindex @option{cygnus} strictness
-
-@emph{The features described in this section are deprecated; you must
-not use any of them in new code, and should remove their use from older
-but still maintained code: they will be withdrawn the next major Automake
-release (1.13).}
-
-Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat). Packages with
-this ancestry are sometimes referred to as ``Cygnus'' trees.
-
-A Cygnus tree has slightly different rules for how a
-@file{Makefile.in} is to be constructed. Passing @option{--cygnus} to
-@command{automake} will cause any generated @file{Makefile.in} to
-comply with Cygnus rules.
-
-Here are the precise effects of @option{--cygnus}:
-
-@itemize @bullet
-
-@item
-The @option{foreign} strictness is implied.
-
-@item
-The options @option{no-installinfo}, @option{no-dependencies} and
-@option{no-dist} are implied (@pxref{Options}).
-
-@item
-The macro @code{AM_MAINTAINER_MODE} is required.
-
-@item
-Info files are always created in the build directory, and not in the
-source directory. Packages that don't use the @option{cygnus} option
-can emulate this effect by using the @option{no-installinfo} option
-and listing the generated info files in the @code{CLEANFILES} variable.
-
-@item
-@file{texinfo.tex} is not required if a Texinfo source file is
-specified. The assumption is that the file will be supplied, but in a
-place that Automake cannot find -- it is an artifact of how Cygnus
-packages are typically bundled. This effect can be emulated in
-packages not using the @option{cygnus} option with a proper definition
-of the @code{TEXINFO_TEX} variable (@pxref{Texinfo}).
-
-@item
-Certain tools will be searched for in the build tree as well as in the
-user's @env{PATH}. These tools are @command{runtest}, @command{expect},
-@command{makeinfo} and @command{texi2dvi}.
-
-@item
-The @code{check} target doesn't depend on @code{all}.
-@end itemize
-
-
@node Not Enough
@chapter When Automake Isn't Enough
Packages made with Autoconf and Automake ship with some generated
files like @file{configure} or @file{Makefile.in}. These files were
-generated on the developer's host and are distributed so that
+generated on the developer's machine and are distributed so that
end-users do not have to install the maintainer tools required to
rebuild them. Other generated files like Lex scanners, Yacc parsers,
or Info documentation, are usually distributed on similar grounds.
-Automake outputs rules in @file{Makefile}s to rebuild these files. For
+Automake output rules in @file{Makefile}s to rebuild these files. For
instance, @command{make} will run @command{autoconf} to rebuild
@file{configure} whenever @file{configure.ac} is changed. This makes
development safer by ensuring a @file{configure} is never out-of-date
inaccurate. Some rebuild rules will be triggered and attempt to
run developer tools such as @command{autoconf} or @command{automake}.
-Actually, calls to such tools are all wrapped into a call to the
-@command{missing} script discussed later (@pxref{maintainer-mode}).
-@command{missing} will take care of fixing the timestamps when these
-tools are not installed, so that the build can continue.
+Calls to such tools are all wrapped into a call to the @command{missing}
+script discussed later (@pxref{maintainer-mode}), so that the user will
+see more descriptive warnings about missing or out-of-date tools, and
+possible suggestions about how to obtain them, rather than just some
+``command not found'' error, or (worse) some obscure message from some
+older version of the required tool they happen to have installed.
+
+Maintainers interested in keeping their package buildable from a CVS
+checkout even for those users that lack maintainer-specific tools might
+want to provide an helper script (or to enhance their existing bootstrap
+script) to fix the timestamps after a
+@command{cvs update} or a @command{git checkout}, to prevent spurious
+rebuilds. In case of a project committing the Autotools-generated
+files, as well as the generated @file{.info} files, such script might
+look something like this:
+
+@smallexample
+#!/bin/sh
+# fix-timestamp.sh: prevents useless rebuilds after "cvs update"
+sleep 1
+# aclocal-generated aclocal.m4 depends on locally-installed
+# '.m4' macro files, as well as on 'configure.ac'
+touch aclocal.m4
+sleep 1
+# autoconf-generated configure depends on aclocal.m4 and on
+# configure.ac
+configure config.h.in
+# so does autoheader-generated config.h.in
+configure config.h.in
+# and all the automake-generated Makefile.in files
+touch `find . -name Makefile.in -print`
+# finally, the makeinfo-generated '.info' files depend on the
+# corresponding '.texi' files
+touch doc/*.info
+@end smallexample
@item
In distributed development, developers are likely to have different
checked for in @file{configure}.
However, if for some reason a rebuild rule is triggered and involves a
-missing tool, @command{missing} will notice it and warn the user.
-Besides the warning, when a tool is missing, @command{missing} will
-attempt to fix timestamps in a way that allows the build to continue.
-For instance, @command{missing} will touch @file{configure} if
-@command{autoconf} is not installed. When all distributed files are
-kept under version control, this feature of @command{missing} allows a
-user @emph{with no maintainer tools} to build a package off its version
-control repository, bypassing any timestamp inconsistency (implied by
-e.g.@: @samp{cvs update} or @samp{git clone}).
+missing tool, @command{missing} will notice it and warn the user, even
+suggesting how to obtain such a tool (at least in case it is a well-known
+one, like @command{makeinfo} or @command{bison}). This is more helpful
+and user-friendly than just having the rebuild rules spewing out a terse
+error message like @samp{sh: @var{tool}: command not found}. Similarly,
+@command{missing} will warn the user if it detects that a maintainer
+tool it attempted to use seems too old (be warned that diagnosing this
+correctly is typically more difficult that detecting missing tools, and
+requires cooperation from the tool itself, so it won't always work).
If the required tool is installed, @command{missing} will run it and
won't attempt to continue after failures. This is correct during
development: developers love fixing failures. However, users with
-wrong versions of maintainer tools may get an error when the rebuild
+missing or too old maintainer tools may get an error when the rebuild
rule is spuriously triggered, halting the build. This failure to let
the build continue is one of the arguments of the
@code{AM_MAINTAINER_MODE} advocates.
@code{MAKEFLAGS} is passed to sub-@command{make}s implicitly by
@command{make} itself.
-However you should not think that all variables ending with
-@code{FLAGS} follow this convention. For instance,
-@code{DISTCHECK_CONFIGURE_FLAGS} (@pxref{Checking the Distribution}) and
-@code{ACLOCAL_AMFLAGS} (see @ref{Rebuilding} and @ref{Local Macros}),
-are two variables that are only useful to the maintainer and have no
-user counterpart.
-
@code{ARFLAGS} (@pxref{A Library}) is usually defined by Automake and
has neither @code{AM_} nor per-target cousin.
@itemize
@item
-If less verbose output has been enabled in the package with the
-@samp{silent-rules} option (@pxref{Options}), you can use
+If less verbose output has been enabled in the package with the use
+of silent rules (@pxref{Automake Silent Rules}), you can use
@code{make V=1} to see the commands being executed.
@item
@code{make -n} can help show what would be done without actually doing
@c LocalWords: texinfo setfilename settitle setchapternewpage texi direntry
@c LocalWords: dircategory in's aclocal ifinfo titlepage Tromey vskip pt sp
@c LocalWords: filll defcodeindex ov cv op tr syncodeindex fn cp vr ifnottex
-@c LocalWords: dir Automake's ac Dist Gnits gnits cygnus dfn Autoconf's pxref
+@c LocalWords: dir Automake's ac Dist Gnits gnits dfn Autoconf's pxref
@c LocalWords: cindex Autoconf autoconf perl samp cvs dist trindex SUBST foo
@c LocalWords: xs emph FIXME ref vindex pkglibdir pkgincludedir pkgdatadir mt
@c LocalWords: pkg libdir cpio bindir sbindir rmt pax sbin zar zardir acindex
# Automatically generated test. DO NOT EDIT BY HAND!
@vars_init
required="@required"
- . ./defs || exit 1
+ . test-init.sh
plan_ $planned
. depcomp.sh
exit \$?
return scalar grep { $opt eq $_ } qw(
check-news
color-tests
- cygnus
dejagnu
dist-bzip2
dist-lzip
no-texinfo.tex
nostdinc
readme-alpha
+ serial-tests
+ parallel-tests
+ silent-rules
std-options
subdir-objects
);
error ($where,
"automatic de-ANSI-fication support has been removed");
}
+ elsif ($_ eq 'cygnus')
+ {
+ error $where, "support for Cygnus-style trees has been removed";
+ }
elsif ($_ eq 'dist-lzma')
{
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
}
- elsif ($_ eq 'parallel-tests')
- {
- # Just recognize it explicitly.
- }
- elsif ($_ eq 'serial-tests')
- {
- # This is a little of an hack, but good enough for the moment.
- delete $options->{'parallel-tests'};
- }
elsif (/^filename-length-max=(\d+)$/)
{
delete $options->{$_};
$options->{'filename-length-max'} = [$_, $1];
}
- elsif ($_ eq 'silent-rules')
- {
- _option_must_be_from_configure ($_, $where);
- }
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
_option_must_be_from_configure ($_, $where);
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
-if %?COLOR%
+
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
std='\e[m'; \
fi; \
}
-else !%?COLOR%
-am__tty_colors = $(am__tty_colors_dummy)
-endif !%?COLOR%
.PHONY: check-TESTS
-if %?PARALLEL_TESTS%
+if !%?SERIAL_TESTS%
include inst-vars.am
.PHONY: recheck
-else !%?PARALLEL_TESTS%
+else %?SERIAL_TESTS%
+
+## Obsolescent serial testsuite driver.
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
test "$$failed" -eq 0; \
else :; fi
-endif !%?PARALLEL_TESTS%
+endif %?SERIAL_TESTS%
## aclocal.m4. ##
## ------------ ##
-## aclocal.m4 must be built by the top-level Makefile, because this is
-## where the user is expected to define $(ACLOCAL_AMFLAGS).
-##
## Whenever a configure dependency changes we need to rebuild
## aclocal.m4 too. Changing configure.ac, or any file included by
## aclocal.m4 might require adding more files to aclocal.m4. Hence
## the $(am__configure_deps) dependency.
+## We still need $(ACLOCAL_AMFLAGS) for sake of backward-compatibility;
+## we should hopefully be able to get rid of it in a not-so-distant
+## future.
if %?REGEN-ACLOCAL-M4%
$(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
?TOPDIR_P? $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY%
+?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
+?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@$(NORMAL_INSTALL)
if %?BASE%
## Default flags to pass to dejagnu. The user can override this.
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
-## In Cygnus mode, these are found in the build tree.
-## Otherwise they are looked for in $PATH.
-if %?CYGNUS%
-EXPECT = `if test -f $(top_builddir)/../expect/expect; then \
- echo $(top_builddir)/../expect/expect; \
- else \
- echo expect; \
- fi`
-
-RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
- echo $(top_srcdir)/../dejagnu/runtest; \
- else \
- echo runtest; \
- fi`
-else ! %?CYGNUS%
EXPECT = expect
RUNTEST = runtest
-endif ! %?CYGNUS%
.PHONY: check-DEJAGNU
## Life is easiest with an absolute srcdir, so do that.
srcdir='$(srcdir)'; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
-## Allow this to work when expect and DejaGnu are in tree.
-## Only required when --cygnus in force.
-?CYGNUS? if [ -f $(top_builddir)/../expect/expect ]; then \
-?CYGNUS? TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \
-?CYGNUS? export TCL_LIBRARY; \
-?CYGNUS? fi; \
- runtest=$(RUNTEST); \
## If runtest can't be found, print a warning but don't die. It is
## pointless to cause a failure if the tests cannot be run at all.
- if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
- if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+ if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
- else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+ else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
fi; \
exit $$exit_status
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-## DIST_COMMON comes first so that README can be the very first file.
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
if %?TOPDIR_P%
endif %?CK-NEWS%
endif %?TOPDIR_P%
##
-## 'missing help2man' may have created some bogus man pages. Ensure they
-## are not distributed.
-##
-if %?INSTALL-MAN%
-if %?HAVE-MANS%
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-## Note that we check existing man pages here only. If there are man pages
-## which are not distributed, and may be generated only conditionally, then
-## we should not error out because of them. This could be refined to take
-## into account only dist_*_MANS, but then we'd be missing out on those
-## the user distributes with EXTRA_DIST.
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically 'make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
-endif %?HAVE-MANS%
-endif %?INSTALL-MAN%
-##
## Only for the top dir.
##
if %?TOPDIR_P%
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES
+?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
if test -f $$p; then \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
## Must ranlib after installing because mod time changes.
## cd to target directory because AIX ranlib messes up with whitespace
## in the argument.
## Building. ##
## ---------- ##
-elc-stamp: $(LISP)
- @echo 'WARNING: Warnings can be ignored. :-)'
- @rm -f elc-temp && touch elc-temp
- if test "$(EMACS)" != no; then \
-## Make sure "$@" isn't empty initially.
- set x; \
-## Populate "$@" with elisp files (found in the current directory
-## or in $srcdir).
- list='$(LISP)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- set x "$$@" "$$d$$p"; shift; \
- done; \
-## Finally call elisp-comp for all files.
- shift; \
- abs_srcdir="$(abs_srcdir)" EMACS="$(EMACS)" $(SHELL) \
- $(elisp_comp) "$$@" || exit 1; \
- else : ; fi
- @mv -f elc-temp $@
-
-## Do not use $(ELCFILES) as target, because it may have been emptied
-## by the user (to disable byte-compilation), and POSIX does not allow
-## an empty target.
-$(am__ELCFILES): elc-stamp
-## Recover from the removal of $@.
-##
-## Do not call "make elc-stamp" if emacs is not available, because it would
-## be useless.
-##
-## If "make -n" is called, do not execute any command in the recipe that
-## changes the tree; however, invoke the recursive make for debuggability.
- @if $(am__make_dryrun); then dry=:; else dry=; fi; \
- if test "$(EMACS)" != no && test ! -f $@; then \
-## If "make -j" is used and more than one file has been erased, several
-## processes can execute this block. We have to make sure that only
-## the first one will run "$(MAKE) $(AM_MAKEFLAGS) elc-stamp", and the
-## other ones will wait.
-##
-## There is a race here if only one child of make receive a signal.
-## In that case the build may fail. We remove elc-stamp when we receive
-## a signal so we are sure the build will succeed the next time.
- $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
- if $$dry mkdir elc-lock 2>/dev/null; then \
-## This code is being executed by the first process.
- $$dry rm -f elc-stamp; \
- $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
- $$dry rmdir elc-lock; \
- else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
- while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
-## Succeed if and only if the first process succeeded.
- $$dry test -f elc-stamp; exit $$?; \
- fi; \
- else : ; fi
+.el.elc:
+## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
+## that $< depends upon can be found (including generated ones).
+## We prefer files from the build directory to those from the source
+## directory, in true VPATH spirit.
+## The destination file is normally determined by appending "c" to the
+## input (which would erronously put it in $(srcdir) in VPATH builds),
+## so we override that, too.
+ if test "$(EMACS)" != "no"; then \
+ am__subdir_includes=''; \
+ case $@ in */*) \
+ am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
+ am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
+ esac; \
+## Emacs byte-compilation won't create this automatically, sadly.
+ test -d $$am__dir || $(MKDIR_P) $$am__dir || exit 1; \
+ $(EMACS) --batch \
+ $(AM_ELCFLAGS) $(ELCFLAGS) \
+ $$am__subdir_includes -L $(builddir) -L $(srcdir) \
+ --eval "(defun byte-compile-dest-file (f) \"$@\")" \
+ --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
+ else :; fi
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-%DIR%LISP_INSTALL = %BASE?$(INSTALL_DATA):$(install_sh_DATA)%
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LISP
+
+?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LISP
+?!EXEC?.PHONY install-data-am: install-%DIR%LISP
+
install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
## Do not install anything if EMACS was not found.
for p in $$list; do \
## A lisp file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- %BASE?$(am__strip_dir):$(am__vpath_adj)% \
+?BASE? $(am__strip_dir) \
+?!BASE? $(am__vpath_adj) \
echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
## Only install .elc file if it exists.
.PHONY clean-am: clean-lisp
clean-lisp:
- -rm -f elc-stamp $(ELCFILES)
+ -rm -f $(ELCFILES)
## -------------- ##
## ------------ ##
if %?INSTALL%
+
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
+
install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
- %BASE?$(am__strip_dir):f=$$p;% \
+?BASE? $(am__strip_dir) \
+?!BASE? f=$$p; \
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS
+?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
+?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
## So we check for both.
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p%LIBTOOL? || test -f $$p1%; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+?LIBTOOL? || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
## We now have a list of sourcefile pairs, separated by newline.
## Turn that into "sourcefile source_base target_dir xformed_target_base",
## with newlines being turned into spaces in a second step.
- sed -e 'p;s,.*/,,;n;h' -e '%BASE?s|.*|.|:s|[^/]*$$||; s|^$$|.|%' \
+ sed -e 'p;s,.*/,,;n;h' \
+?BASE? -e 's|.*|.|' \
+?!BASE? -e 's|[^/]*$$||; s|^$$|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
## The following awk script turns that into one line containing directories
## but keep the directory part in the hold buffer, in order to
## reapply it again afterwards in the nobase case. Append $(EXEEXT).
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/'%BASE? : -e 'x;s,[^/]*$$,,;G;s,\n,,'%`; \
+ -e 's/$$/$(EXEEXT)/' \
+?!BASE? -e 'x;s,[^/]*$$,,;G;s,\n,,' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
+?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
if %?BASE%
if %?INSTALL%
## if doesn't work properly for Automake variables yet.
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
+?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
+?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
+
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+
## All documented targets which invoke 'make' recursively, or depend
-## on targets that do so.
-AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=)
+## on targets that do so. GNUmakefile from gnulib depends on this.
+AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
-.PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
-.MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
+.PHONY .MAKE: $(am__recursive_targets)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+$(am__recursive_targets):
## Using $failcom allows "-k" to keep its natural meaning when running a
## recursive rule.
@fail= failcom='exit 1'; \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-
mostlyclean: mostlyclean-recursive
clean: clean-recursive
distclean: distclean-recursive
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+## Handle VPATH correctly.
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+
## ---- ##
## ID. ##
## ---- ##
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
## ------ ##
## ------ ##
ETAGS = etags
-.PHONY: tags
+.PHONY: TAGS tags
if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += tags TAGS
-endif %?SUBDIRS%
-tags: TAGS
-
-TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+AM_RECURSIVE_TARGETS += TAGS
+RECURSIVE_TARGETS += tags-recursive
+tags: tags-recursive
+else !%?SUBDIRS%
+tags: tags-am
+endif !%?SUBDIRS%
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
## We use the positional parameters to build the subdir list with
## absolute names, without the need to worry about white space in `pwd`.
set x; \
?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
?SUBDIRS? fi; \
?SUBDIRS? done; \
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
## Remove the 'x' we added first:
shift; \
## Make sure we have something to run etags on.
CTAGS = ctags
.PHONY: CTAGS ctags
if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += ctags CTAGS
-endif %?SUBDIRS%
-ctags: CTAGS
-
-## We have a dummy name here because 'tags' has already been in use
-## for a long time to mean Emacs-style tags. Oops. This means the
-## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
-## Make sure the list of sources is unique.
- list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-## Handle VPATH correctly.
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+AM_RECURSIVE_TARGETS += CTAGS
+RECURSIVE_TARGETS += ctags-recursive
+ctags: ctags-recursive
+else !%?SUBDIRS%
+ctags: ctags-am
+endif !%?SUBDIRS%
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
## Make sure we have something to run ctags on.
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
## ------- ##
if %?TOPDIR_P%
-
CSCOPE = cscope
.PHONY: cscope clean-cscope
AM_RECURSIVE_TARGETS += cscope
-
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
clean-cscope:
-rm -f cscope.files
-
-cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
-
+cscope.files: clean-cscope cscopelist
endif %?TOPDIR_P%
-.PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+if %?SUBDIRS%
+RECURSIVE_TARGETS += cscopelist-recursive
+cscopelist: cscopelist-recursive
+else !%?SUBDIRS%
+cscopelist: cscopelist-am
+endif !%?SUBDIRS%
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146). We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146). Use a different build-dir for
+## each file (and distinct from that of the corresponding PDF file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+ $(TEXI2DVI) %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
+?GENERIC? %SOURCE%
+?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146). We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146). Use a different build-dir for
+## each file (and distinct from that of the corresponding DVI file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+ $(TEXI2PDF) %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
+?GENERIC? %SOURCE%
+?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
## ----------- ##
if %?LOCAL-TEXIS%
-if ! %?CYGNUS%
TEXI2DVI = texi2dvi
-
-else %?CYGNUS%
-
-## Find these programs wherever they may lie. Yes, this has
-## intimate knowledge of the structure of the texinfo distribution.
-MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
- echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
- else \
- echo makeinfo; \
- fi`
-
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
- echo $(top_srcdir)/../texinfo/util/texi2dvi; \
- else \
- echo texi2dvi; \
- fi`
-endif %?CYGNUS%
-
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
.PHONY: mostlyclean-aminfo
mostlyclean-aminfo:
## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## contain any directory created by "makeinfo --html", as well as the
+## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
-rm -rf %MOSTLYCLEAN%
.PHONY clean-am: clean-aminfo
clean-aminfo:
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
?TEXICLEAN? -test -z "%TEXICLEAN%" \
?TEXICLEAN? || rm -rf %TEXICLEAN%
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
?MAINTCLEAN? || rm -rf %MAINTCLEAN%
-?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
endif %?LOCAL-TEXIS%
+++ /dev/null
-#!/bin/sh
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
-
-scriptversion=2012-07-05.17; # UTC
-
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
-#
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No files. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "elisp-comp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
- # Value of "t" means we are running in a shell under Emacs.
- # Just assume Emacs is called "emacs".
- EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-mkdir $tempdir
-cp "$@" $tempdir
-
-(
- cd $tempdir
- echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
- $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
- mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2012-06-26.16; # UTC
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acinclude.m4' or '${configure_ac}'. You might want
- to install the Automake and Perl packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified '${configure_ac}'. You might want to install the
- Autoconf and GNU m4 packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'acconfig.h' or '${configure_ac}'. You might want
- to install the Autoconf and GNU m4 packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
- You might want to install the Automake and Perl packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get '$1' as part of Autoconf from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: '$1' $msg. You should only need it if
- you modified a '.y' file. You may need the Bison package
- in order for those modifications to take effect. You can get
- Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.l' file. You may need the Flex package
- in order for those modifications to take effect. You can get
- Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- Help2man package in order for those modifications to take
- effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: '$1' is $msg. You should only need it if
- you modified a '.texi' or '.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy 'make' (AIX,
- DU, IRIX). You might want to install the Texinfo package or
- the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
- *)
- echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the 'README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing '$1' program."
- exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
;;
-esac
-
-exit 0
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
#! /bin/sh
-# test-driver - basic driver script for the 'parallel-tests' mode.
+# test-driver - basic testsuite driver script.
scriptversion=2012-06-27.10; # UTC
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.12'
+[am__api_version='1.12a'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.12.4a], [],
+m4_if([$1], [1.12a], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.4a])dnl
+[AM_AUTOMAKE_VERSION([1.12a])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+++ /dev/null
-## ----------------------------------------- ## -*- Autoconf -*-
-## ANSIfy the C compiler whenever possible. ##
-## From Franc,ois Pinard ##
-## ----------------------------------------- ##
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This was merged into AC_PROG_CC in Autoconf.
-
-AU_DEFUN([AM_PROG_CC_STDC],
-[AC_PROG_CC
-AC_DIAGNOSE([obsolete], [$0:
- your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon
- 'ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
- you adjust the code. You can also remove the above call to
- AC_PROG_CC if you already called it elsewhere.])
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-])
-AU_DEFUN([fp_PROG_CC_STDC])
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
AC_MSG_RESULT([no])
fi], [AC_MSG_RESULT([no])])
])
-
-AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
--- /dev/null
+# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*-
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_EXTRA_RECURSIVE_TARGETS
+# --------------------------
+# Define the list of user recursive targets. This macro exists only to
+# be traced by Automake, which will ensure that a proper definition of
+# user-defined recursive targets (and associated rules) is propagated
+# into all the generated Makefiles.
+AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [_$0(m4_flatten([$1]))])
+# TODO: We should really reject non-literal arguments here...
+m4_define([_AM_EXTRA_RECURSIVE_TARGETS], [])
+++ /dev/null
-## -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated. For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+ [$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
AC_SUBST([lispdir])
])# AM_PATH_LISPDIR
-
-AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
AC_SUBST([MAINT])dnl
]
)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl FIXME to be removed in Automake 1.13.
+dnl FIXME to be removed in Automake 1.14.
AC_DIAGNOSE([obsolete],
[$0: this macro is deprecated, and will soon be removed.
You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
+++ /dev/null
-# Support for obsolete Gettext macro. -*- Autoconf -*-
-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# See comment in obsolete.m4.
-AU_DEFUN([ud_GNU_GETTEXT], [AM_GNU_GETTEXT])
+++ /dev/null
-# Support for obsolete Libtool macro. -*- Autoconf -*-
-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# See comment in obsolete.m4.
-AU_DEFUN([gm_PROG_LIBTOOL], [AM_PROG_LIBTOOL])
+++ /dev/null
-## -*- Autoconf -*-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# Obsolete Automake macros.
-
-# We put here only the macros whose substitution is not an Automake
-# macro; otherwise including this file would trigger dependencies for
-# all the substitutions. Generally, obsolete Automake macros are
-# better AU_DEFUNed in the same file as their replacement, or alone in
-# a separate file (see obsol-gt.m4 or obsol-lt.m4 for instance).
-
-AU_DEFUN([AC_FEATURE_CTYPE], [AC_HEADER_STDC])
-AU_DEFUN([AC_FEATURE_ERRNO], [AC_REPLACE_FUNCS([strerror])])
-AU_DEFUN([AM_CYGWIN32], [AC_CYGWIN])
-AU_DEFUN([AM_EXEEXT], [AC_EXEEXT])
-AU_DEFUN([AM_FUNC_MKTIME], [AC_FUNC_MKTIME])
-AU_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
- [AC_HEADER_TIOCGWINSZ])
-AU_DEFUN([AM_MINGW32], [AC_MINGW32])
-AU_DEFUN([AM_PROG_INSTALL], [AC_PROG_INSTALL])
-AU_DEFUN([AM_SANITY_CHECK_CC], [AC_PROG_CC])
-AU_DEFUN([AM_SYS_POSIX_TERMIOS], [AC_SYS_POSIX_TERMIOS])
-AU_DEFUN([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
-AU_DEFUN([fp_PROG_INSTALL], [AC_PROG_INSTALL])
-AU_DEFUN([md_TYPE_PTRDIFF_T], [AC_CHECK_TYPES([ptrdiff_t])])
-
-# Don't know how to translate these.
-# If used, Autoconf will complain that they are possibly unexpended;
-# this seems a good enough error message.
-# AC_FEATURE_EXIT
-# AC_SYSTEM_HEADER
fi; \
for d in $$dirs; do \
for s in tap sh; do \
- ls $$d/t/*.$$s $$d/t/ax/*.$$s 2>/dev/null; \
+ ls $$d/t/ax/*.$$s $$d/t/*.$$s $$d/contrib/t/*.$$s 2>/dev/null; \
done; \
done | sort)
xdefs = \
$(srcdir)/t/ax/am-test-lib.sh \
$(srcdir)/t/ax/test-lib.sh \
- $(srcdir)/t/ax/test-defs.in \
- $(srcdir)/defs
+ $(srcdir)/t/ax/test-defs.in
ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
sc_perl_local \
sc_AMDEP_TRUE_in_automake_in \
sc_tests_make_without_am_makeflags \
+$(sc_obsolete_requirements_rules) \
+sc_tests_no_source_defs \
sc_tests_obsolete_variables \
sc_tests_here_document_format \
sc_tests_command_subst \
-sc_tests_Exit_not_exit \
+sc_tests_exit_not_Exit \
sc_tests_automake_fails \
sc_tests_required_after_defs \
sc_tests_overriding_macros_on_cmdline \
exit 1; \
else :; fi
+## Look out for obsolete requirements specified in the test cases.
+sc_obsolete_requirements_rules = sc_no_texi2dvi-o sc_no_makeinfo-html
+modern-requirement.texi2dvi-o = texi2dvi
+modern-requirement.makeinfo-html = makeinfo
+
+$(sc_obsolete_requirements_rules): sc_no_% :
+ @if grep -E 'required=.*\b$*\b' $(xtests); then \
+ echo "Requirement '$*' is obsolete and shouldn't" \
+ "be used anymore." >&2; \
+ echo "You should use '$(modern-requirement.$*)' instead." >&2; \
+ exit 1; \
+ fi
+
## Tests should never call some programs directly, but only through the
## corresponding variable (e.g., '$MAKE', not 'make'). This will allow
## the programs to be overridden at configure time (for less brittleness)
exit 1; \
fi
-## Tests should no more call 'Exit', just 'exit'. That's because we
+## Tests should no longer call 'Exit', just 'exit'. That's because we
## now have in place a better workaround to ensure the exit status is
## transported correctly across the exit trap.
-sc_tests_Exit_not_exit:
+sc_tests_exit_not_Exit:
@if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
exit 1; \
fi
+## Guard against obsolescent uses of ./defs in tests. Now,
+## 'test-init.sh' should be used instead.
+sc_tests_no_source_defs:
+ @if grep -E '\. .*defs($$| )' $(xtests); then \
+ echo "Source 'test-init.sh', not './defs'." 1>&2; \
+ exit 1; \
+ fi
+
## Use AUTOMAKE_fails when appropriate
sc_tests_automake_fails:
@if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
rm -f configure.ac depcomp # Not required.
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-
# -----------------------------------------------------------------------
# Test for bug reported by François Pinard.
}
acoutbs_check 1 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutbs1], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile \
zot)
END
acoutbs_check 2 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AC_INIT([acoutbs2], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(\
Makefile \
zot
cd acoutnoq
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutnoq], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile, [true])
END
cd acoutpt
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutpt], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile], [true])
END
cd acoutqnl
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutqnl], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile],
[echo zardoz has spoken])
END
# TODO: puts third-party macros directly into 'acdir'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# directory, the macro from the lexically greatest file is used.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Same as acloca11.sh, but without calling MACRO2.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure changes to m4_included files also cause aclocal.m4 to change.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
m4_include([somefile.m4])
# Make sure m4_included files are also scanned for definitions.
# Report from Phil Edwards.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([defs])
AM_PROG_LIBTOOL
AC_OUTPUT
END
echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
cat >>Makefile.am<<\EOF
-ACLOCAL_AMFLAGS = -I defs
testdist1: distdir
test -f $(distdir)/acinclude.m4
test -f $(distdir)/a.m4
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004-2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure m4_included files are also scanned for definitions.
+# Report from Phil Edwards.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+echo 'm4_include([a.m4])' > acinclude.m4
+echo 'm4_include([b.m4])' > a.m4
+
+cat >b.m4 <<EOF
+m4_include([c.m4])
+AC_DEFUN([AM_PROG_LIBTOOL],
+[AC_REQUIRE([SOMETHING])dnl
+AC_REQUIRE([SOMETHING_ELSE])dnl
+])
+
+AC_DEFUN([SOMETHING])
+EOF
+
+echo 'm4_include([d.m4])' > c.m4
+echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
+
+mkdir defs
+echo 'AC_DEFUN([SOMETHING_ELSE])' >defs/e.m4
+echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
+
+cat >>Makefile.am<<\EOF
+ACLOCAL_AMFLAGS = -I defs
+testdist1: distdir
+ test -f $(distdir)/acinclude.m4
+ test -f $(distdir)/a.m4
+ test -f $(distdir)/b.m4
+ test -f $(distdir)/c.m4
+ test -f $(distdir)/d.m4
+ test ! -d $(distdir)/defs
+testdist2: distdir
+ test -f $(distdir)/acinclude.m4
+ test -f $(distdir)/a.m4
+ test -f $(distdir)/b.m4
+ test -f $(distdir)/c.m4
+ test -f $(distdir)/d.m4
+ test ! -f $(distdir)/defs/e.m4
+ test -f $(distdir)/defs/f.m4
+EOF
+
+$ACLOCAL -I defs
+
+$FGREP acinclude.m4 aclocal.m4
+# None of the following macro should be included. acinclude.m4
+# includes the first four, and the last two are not needed at all.
+$FGREP a.m4 aclocal.m4 && exit 1
+$FGREP b.m4 aclocal.m4 && exit 1
+$FGREP c.m4 aclocal.m4 && exit 1
+$FGREP d.m4 aclocal.m4 && exit 1
+$FGREP defs/e.m4 aclocal.m4 && exit 1
+$FGREP defs/f.m4 aclocal.m4 && exit 1
+
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE testdist1
+
+cp aclocal.m4 aclocal.old
+$sleep
+echo 'AC_DEFUN([FOO], [ANOTHER_MACRO])' >> c.m4
+$MAKE
+# Because c.m4 has changed, aclocal.m4 must have been rebuilt.
+is_newest aclocal.m4 aclocal.old
+# However, since FOO is not used, f.m4 should not be included
+# and the contents of aclocal.m4 should remain the same
+diff aclocal.m4 aclocal.old
+
+# If FOO where to be used, that would be another story, of course:
+# f.m4 should be included
+$sleep
+echo FOO >> configure.ac
+$MAKE
+$FGREP defs/f.m4 aclocal.m4
+$MAKE testdist2
+
+# Make sure aclocal diagnose missing included files with correct 'file:line:'.
+rm -f b.m4
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
# PR/319.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
# Start macros with AM_ because that causes aclocal to complain if it
# cannot find them.
# evaluated.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_SUBST([POM])
# Make sure aclocal report unused required macros.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Test for --install with #serial numbers.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# more than just variable definitions.
# Report from Peter Breitenlohner (PR/450).
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<'END'
AC_INIT([acloca19], [1.0])
# Make sure aclocal does not write into symlinked aclocal.m4.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
echo 'm4_define([FOO], [wrong foo])' > foo.m4
echo 'm4_define([FOO], [right foo])' > acinclude.m4
# an Autoconf macro.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
dnl m4_include(__some_really_bogus_nonexistent_file__.m4)
# dependencies. See also related the tests 'remake-deleted-m4-file.sh'
# and 'remake-renamed-m4-macro-and-file.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([.])
FOO
AC_OUTPUT
EOF
+
cat >foo.m4 <<EOF
AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
EOF
+
cat >bar.m4 <<EOF
AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
EOF
-cat >Makefile.am <<EOF
-ACLOCAL_AMFLAGS = -I .
-EOF
-$ACLOCAL -I .
+: >Makefile.am
+
+$ACLOCAL
$AUTOMAKE
$AUTOCONF
./configure
+
$MAKE
grep GREPFOO Makefile
grep GREPBAR Makefile && exit 1
sed 's/FOO/BAR/' < configure.ac > t
mv -f t configure.ac
rm -f foo.m4
+
$MAKE
grep GREPFOO Makefile && exit 1
grep GREPBAR Makefile
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2007-2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure the "deleted header file" issue is fixed wrt. aclocal.m4
+# dependencies.
+# NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
+# variable; see sister test 'acloca22.test' for a modern equivalent.
+
+. test-init.sh
+
+cat >>configure.ac <<EOF
+FOO
+AC_OUTPUT
+EOF
+
+cat >foo.m4 <<EOF
+AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
+EOF
+
+cat >bar.m4 <<EOF
+AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
+EOF
+
+cat >Makefile.am <<EOF
+ACLOCAL_AMFLAGS = -I .
+EOF
+
+$ACLOCAL -I .
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+$MAKE
+grep GREPFOO Makefile
+grep GREPBAR Makefile && exit 1
+
+sed 's/FOO/BAR/' < configure.ac > t
+mv -f t configure.ac
+rm -f foo.m4
+
+$MAKE
+grep GREPFOO Makefile && exit 1
+grep GREPBAR Makefile
+
+:
# Ensure we diagnose underquoted AC_DEFUN's.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test aclocal's '--acdir', '--automake-acdir' and '--system-acdir'
-# options. Also check that stuff in the automake acdir takes precedence
-# over stuff in the system acdir.
+# Test aclocal's '--automake-acdir' and '--system-acdir' options. Also
+# check that stuff in the automake acdir takes precedence over stuff in
+# the system acdir.
-. ./defs || exit 1
+. test-init.sh
mkdir am sys
$FGREP 'am--macro' configure
$FGREP 'my--macro' configure && exit 1 # Just to be sure.
-rm -rf autom4te*.cache
-
-# Obsolescent '--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep '.*--acdir.*deprecated' stderr
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
-
:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the obsolescent idiom of setting $(ACLOCAL_AMFLAGS) in
+# Makefile.am still works. Remove this test once support for this
+# obsolescent idiom is removed.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+MACRO_FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+mkdir m4_1 m4_2
+cat > m4_1/foo.m4 <<'END'
+AC_DEFUN([MACRO_FOO], [: > foo])
+END
+cat > m4_2/bar.m4 <<'END'
+AC_DEFUN([MACRO_BAR], [: > bar])
+END
+
+cat > Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4_2 --verbose
+check-local:
+ test ! -r foo
+ test -f bar
+DISTCLEANFILES = bar
+END
+
+$ACLOCAL -I m4_1 >output 2>&1 || { cat output; exit 1; }
+cat output
+grep 'found macro' output && exit 1 # Sanity check.
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+test -f foo
+rm -f foo
+
+# ACLOCAL_AMFLAGS is used in rebuild rules, so trigger them.
+$sleep
+
+sed 's/MACRO_FOO/MACRO_BAR/' configure.ac > t
+mv -f t configure.ac
+
+$MAKE Makefile >output 2>&1 || { cat output; exit 1; }
+cat output
+grep "^aclocal.*:.*found macro.*MACRO_BAR.*m4_2/bar\.m4" output
+grep "macro.*MACRO_FOO" output && exit 1
+test ! -r foo
+test -f bar
+
+$MAKE distcheck
+
+:
# Make sure autoconf version checks in aclocal.m4 are robust.
am_create_testdirs=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
m4_define([AC_AUTOCONF_VERSION], [9999a])
# ACLOCAL_PATH variable, it is clear that this is the right thing
# to do. See also automake bug#8407.
-. ./defs || exit 1
+. test-init.sh
mkdir loc sys
am_create_testdir=empty
required=ro-dir
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# FIXME: this is a good candidate for a conversion to TAP.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Several tests on the use of the m4 macro AC_CONFIG_MACRO_DIR with
+# aclocal.
+
+am_create_testdir=empty
+. test-init.sh
+
+plan_ later
+
+ocwd=$(pwd) || fatal_ "getting current working directory"
+ACLOCAL_PATH=; unset ACLOCAL_PATH
+
+#
+# General utility functions and variables.
+#
+# TODO: These should maybe be refactored, generalized and
+# moved into 't/ax/tap-functions.sh' ...
+#
+
+tcount=0
+r=invalid
+description=''
+directive=''
+
+test_begin ()
+{
+ if test -n "$description"; then
+ fatal_ "'test_begin' called, but another test seems active already"
+ else
+ r=ok
+ description=$1
+ echo "$description" > README.txt
+ shift
+ fi
+ tcount=$(($tcount + 1)) && test $tcount -gt 0 \
+ || fatal_ "failed to bump the test count"
+ mkdir $tcount.d
+ cd $tcount.d
+}
+
+test_end ()
+{
+ if test -z "$description"; then
+ fatal_ "'test_end' called, but no test seems active"
+ else
+ cd "$ocwd" || fatal_ "cannot chdir back to top-level directory"
+ result_ "$r" -D "$directive" -- "$description"
+ # Don't leave directories for successful subtests hanging around.
+ if test -z "$directive" && test "$r" = ok; then
+ rm -rf "$tcount.d" || fatal_ "removing subdir $tcount.d"
+ fi
+ r=invalid directive= description=
+ fi
+}
+
+test_todo () { directive=TODO; }
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR is honored"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [10.0])
+AC_CONFIG_MACRO_DIR([macro-dir])
+MY_FOO
+END
+
+mkdir macro-dir
+echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > macro-dir/foo.m4
+
+$ACLOCAL \
+ && $FGREP 'm4_include([macro-dir/foo.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $FGREP 'MY_FOO' configure \
+ && $FGREP '::my::foo::' configure \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) interaction with --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst], [1.0])
+AC_CONFIG_MACRO_DIR([the-dir])
+THE_MACRO
+END
+
+mkdir sys-dir the-dir
+echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4
+
+test ! -r the-dir/my.m4 \
+ && $ACLOCAL --install --system-acdir ./sys-dir \
+ && diff sys-dir/my.m4 the-dir/my.m4 \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "'-I' option wins over AC_CONFIG_MACRO_DIR"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [4.6])
+AC_CONFIG_MACRO_DIR([dir1])
+MY_FOO
+END
+
+mkdir dir1 dir2
+echo 'AC_DEFUN([MY_FOO], [::ko::ko::])' > dir1/1.m4
+echo 'AC_DEFUN([MY_FOO], [::ok::ok::])' > dir2/2.m4
+
+$ACLOCAL -I dir2 \
+ && $FGREP 'm4_include([dir2/2.m4])' aclocal.m4 \
+ && not $FGREP 'm4_include([dir1/1.m4])' aclocal.m4 \
+ && $AUTOCONF \
+ && not $FGREP '::ko::ko::' configure \
+ && $FGREP '::ok::ok::' configure \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) can create directory 'foo'"
+
+cat > configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_MACRO_DIR([foo])
+MY_MACRO
+END
+
+mkdir acdir
+echo 'AC_DEFUN([MY_MACRO], [:])' > acdir/bar.m4
+
+test ! -d foo \
+ && $ACLOCAL --install --system-acdir ./acdir \
+ && diff acdir/bar.m4 foo/bar.m4 \
+ || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+:
# if the '--install' option is not given.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# are involved.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# ACLOCAL_PATH and '--install' interactions.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# in a directory specified in ACLOCAL_PATH.
$ACLOCAL --install 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
-grep ' no -I was supplied' stderr
+grep 'impossible without -I .* nor AC_CONFIG_MACRO_DIR' stderr
test ! -e pdir/foo.m4
# The '--install' option should cause a required macro found in a
# Non-existent directories in ACLOCAL_PATH are ok.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Check precedence rules for ACLOCAL_PATH.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([foo], [1.0])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
FOO_MACRO
BAR_MACRO
AC_PROG_LIBTOOL
# Check basic ACLOCAL_PATH support.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Test on aclocal's '--print-ac-dir' option.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
$ACLOCAL --print-ac-dir
test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
-$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
-test "$($ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir)" = foo
-
$ACLOCAL --system-acdir /bar --print-ac-dir
test "$($ACLOCAL --system-acdir /bar --print-ac-dir)" = /bar
# Check verbose messages by 'aclocal --install'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Test on some aclocal options. Report from Alexandre Oliva.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.ac
# Test to make sure include of include detects missing macros
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_INIT([$me], [1.0])
# Report from Jim Meyering.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([m4])
AC_PROG_RANLIB
AM_PROG_AR
AC_PROG_CC
cat >Makefile.am <<'EOF'
SUBDIRS = lib
EXTRA_DIST = m4/mymacro.m4
-ACLOCAL_AMFLAGS = -I m4
check-foo: distdir
test -f $(distdir)/lib/foo.c
test -f $(distdir)/lib/bar.c
test -f $(distdir)/lib/bar.c
EOF
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
# Test to make sure that aclocal.m4's dependencies are honored in
# sub-directories. See also related tests 'remake-subdir*.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_TEST([GREPME])
+AC_CONFIG_MACRO_DIR([m4])
+FOO_TEST([GREPME])
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
: > sub/Makefile.am
mkdir m4
-echo 'AC_DEFUN([AM_TEST], [echo $@])' > m4/moredefs.m4
+echo 'AC_DEFUN([FOO_TEST], [echo $@])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
./configure
# Update an aclocal.m4 dependency, then make sure all Makefiles are
# updated, even from a sub-directory. Check that AU_ALIAS is
-# recognized. Change the definition of AM_TEST to check that its new
+# recognized. Change the definition of FOO_TEST to check that its new
# definition is used.
$sleep # Modified configure dependencies must be newer than config.status.
-echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
+echo 'AU_ALIAS([FOO_TEST], [AC_SUBST])' > m4/moredefs.m4
cd sub
$MAKE
cd ..
$MAKE distdir
test -f $me-1.0/m4/moredefs.m4
-# Change the definition of AM_TEST to check that its new definition is
+# Change the definition of FOO_TEST to check that its new definition is
# used. Check that AC_DEFUN_ONCE is caught.
$sleep # Modified configure dependencies must be newer than config.status.
-echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
+echo 'AC_DEFUN_ONCE([FOO_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
$MAKE
grep 'm4/moredefs\.m4' aclocal.m4
grep '__GREPME__' configure
# Make sure aclocal.m4 is rebuilt whenever a configure
# dependency changes. Test for acinclude.m4 and VPATH too.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
SOME_DEFS
AC_CONFIG_FILES([sub/Makefile])
+AC_CONFIG_MACRO_DIR([m4])
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --copy --add-missing
# Make sure aclocal does not overwrite aclocal.m4 needlessly.
# Also make sure automake --no-force does not overwrite Makefile.in needlessly.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
SOME_DEFS
# Make sure aclocal does not require unused macros.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Make sure aclocal define macros in the same order as -I's.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT
# Test to make sure there are no spurious acinclude warnings.
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_DEFUN([AM_INIT_GUILE_MODULE], [
+AM_INIT_AUTOMAKE([dist-xz])
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# default, but copied if the '--copy' option is used.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ "later"
check_ <<'END'
== Name ==
-elisp-comp
-== Files ==
-elisp-comp
-== configure.ac ==
-AM_PATH_LISPDIR
-== Makefile.am ==
-lisp_LISP = foo.el
-END
-
-check_ <<'END'
-== Name ==
py-compile
== Files ==
py-compile
# Test to make sure several *-local's in a single rule work.
-. ./defs || exit 1
+. test-init.sh
targets='all install-exec install-data uninstall'
echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
# Test to make sure all-local and other -local targets work correctly.
-. ./defs || exit 1
+. test-init.sh
$ACLOCAL
# Make sure we complain if @ALLOCA@ is used without being set in configure.ac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AM_PROG_AR
# Make sure we complain if @LTALLOCA@ is used without being set in configure.ac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Make sure README-alpha is distributed when appropriate. Report from
# Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([alpha], [1.0a])
# Another check for README-alpha support. This time it is requested
# from configure.ac. Report from Akim Demaille.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([alpha], [1.0b])
# AM_DEFAULT_SOURCE_EXT
required='cc c++'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to see if aclocal correctly reports missing AM_ macro.
-. ./defs || exit 1
+. test-init.sh
echo AM_ZARDOZ >> configure.ac
# Test AM_MISSING_PROG.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AM_MISSING_PROG([NO_SUCH_COMMAND], [am-none-none])
e = $@-stderr
debug_info = grep . $@-stdout $@-stderr
-status_is = $(debug_info); echo $@: st=$$st; : test $$st -eq
+status_is = $(debug_info); echo $@: st=$$st; test $$st -eq
w_mis = 'am-none-none' is needed, and is missing on your system
w_old = 'am-exit-63' is needed, and is probably too old
-# FIXME: make this test stricter w.r.t. the exit statuses once
-# FIXME: we are merged to master!
test1:
st=0; $(NO_SUCH_COMMAND) >$o 2>$e || st=$$?; $(status_is) 127
grep "^WARNING: $(w_mis)" $e
# parallel-tests: check AM_TESTS_ENVIRONMENT support, and its
# interactions with TESTS_ENVIRONMENT.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_MKDIR_P
# Test to see if AM_ name can be assigned to in configure.ac.
# Report from Steve Robbins.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CFLAGS=foo
# using DESTDIR to build simple, no-frills binary packages.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
am_create_testdir=empty
required=gcc
-. ./defs || exit 1
+. test-init.sh
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
am_create_testdir=empty
required=i586-mingw32msvc-gcc
-. ./defs || exit 1
+. test-init.sh
cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
# (i.e., calls with two or three arguments).
-. ./defs || exit 1
+. test-init.sh
warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
# Make Automake diagnose a conditional AUTOMAKE_OPTIONS.
# Report from Bas Wijnen.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AM_CONDITIONAL([COND], [true])
# Check that errors about AUTOMAKE_OPTIONS refers to correct
# locations.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
# comment \
# Check that AUTOMAKE_OPTIONS support variable expansion.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Check for _AM_SUBST_NOTMAKE.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([backslash], "\\")
# Check that any attempt to use the obsolete de-ANSI-fication support
# is diagnosed.
-. ./defs || exit 1
+. test-init.sh
warn_rx='automatic de-ANSI-fication.*removed'
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
get_shell_script ar-lib
# Test if AM_PROG_AR installs ar-lib.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if lib_LIBRARIES requests AM_PROG_AR.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if lib_LTLIBRARIES requests AM_PROG_AR.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cp configure.ac X
# Keep this test in sync with sister test 'ar-lib5b.sh'.
required=lib
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# This test does not require Microsoft lib.
# Keep this test in sync with sister test 'ar-lib5a.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Keep this test in sync with sister test 'ar-lib6b.sh'.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this test in sync with sister test 'ar-lib6a.sh'.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# Make sure that AR, ARFLAGS, and RANLIB can be substituted from configure.ac.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
# Report from Kevin Ryde.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure that AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
# is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if configure bails out if $AR does not work and AM_PROG_AR is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# Test the optional argument of AM_PROG_AR.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR([
# Test of basic assembly functionality.
# Keep this in sync with sister tests 'asm2.sh' and 'asm3.sh'.
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.stub
# Test of basic preprocessed assembly functionality.
# Keep this in sync with sister tests 'asm.sh' and 'asm3.sh'.
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.stub
# Test of basic preprocessed assembly functionality with extension '.sx'.
# Keep this in sync with sister tests 'asm.sh' and 'asm2.sh'.
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.stub
# placed in a subdirectory.
# Related to automake bug#7819.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# (at automake runtime).
# Related to automake bug#7819.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# remove this test.
# Related to automake bug#7819.
-. ./defs || exit 1
+. test-init.sh
{ echo 'm4_include([defs.m4])'
cat configure.ac
# exist at automake runtime.
# Related to automake bug#7819.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
# automatically distributed when placed in a subdirectory.
# Related to automake bug#7819.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# Check that there are no duplicates in the list of files automatically
# distributed by automake.
-. ./defs || exit 1
+. test-init.sh
re='Files .*automatically distributed.*if found'
# Related to automake bug#7819.
required=makeinfo
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << END
AC_OUTPUT
#
# Keep this test in sync with sister test 'autodist.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
# Keep this test in sync with sister test 'autodist-subdir.sh'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# remake rules for AC_CONFIG_HEADERS arguments after the first one,
# not even when subdirs are involved.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_HEADERS([a.h b.h sub/c.h])
# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_CONFIG_HEADERS([thisfile.h])
+++ /dev/null
-#!/bin/sh
-# Copyright (C) 2002-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<EOF
-AM_CONFIG_HEADER([thisfile.h])
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOHEADER
-
-test -f thisfile.h.in
# Check rebuild rules for autoheader.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
m4_include([foo.m4])
# (This should also work without GNU Make.)
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_PROG_CC
# Removal recovery rules for AC_CONFIG_HEADERS should not remove files
# with 'make -n'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_CONFIG_HEADERS([config.h])
rm -f config.h
$MAKE -n
test -f stamp-h1
-test ! -r config.h
+test ! -e config.h
:
# Test Automake's command-line options.
-. ./defs || exit 1
+. test-init.sh
plan_ 17
# Make sure that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
# to use '.', '..' and '../..', in precisely that order.
-. ./defs || exit 1
+. test-init.sh
nil=__no_such_program
# It should be possible to use a computed auxdir. This might seem
# bizarre, but it is actually used in multilib builds.
-. ./defs || exit 1
+. test-init.sh
plan_ 3
# Test to make sure we diagnose misplaced AC_CONFIG_AUX_DIR.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
# Make sure we diagnose non-existent AC_CONFIG_AUX_DIR names.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
-. ./defs || exit 1
+. test-init.sh
plan_ 4
# Test to make sure AC_CONFIG_AUX_DIR works correctly.
-. ./defs || exit 1
+. test-init.sh
# The "./." is here so we don't have to mess with subdirs.
cat > configure.ac <<END
# config auxdir.
# Keep this in sync with sister tests 'auxdir7.sh' and 'auxdir8.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# making the top-level directory the config auxdir.
# Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir8.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# directory.
# Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir7.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
makedepend -f- \
|| skip_all_ "required program 'makedepend' not available"
;;
- makeinfo-html)
- # Make sure we have makeinfo, and it understands '--html'.
- echo "$me: running makeinfo --html --version"
- makeinfo --html --version \
- || skip_all_ "cannot find a makeinfo program that groks" \
- "the '--html' option"
- ;;
mingw)
uname_s=$(uname -s || echo UNKNOWN)
echo "$me: system name: $uname_s"
skip_all_ "TeX is required, but it wasn't found by configure"
fi
;;
- texi2dvi-o)
- # Texi2dvi supports '-o' since Texinfo 4.1.
- echo "$me: running texi2dvi -o /dev/null --version"
- texi2dvi -o /dev/null --version \
- || skip_all_ "required program 'texi2dvi' not available"
- ;;
lex)
test x"$LEX" = x"false" && skip_all_ "lex not found or disabled"
export LEX
{
echo "AC_INIT([$me], [1.0])"
if test x"$am_serial_tests" = x"yes"; then
- echo "AM_INIT_AUTOMAKE"
+ echo "AM_INIT_AUTOMAKE([serial-tests])"
else
- echo "AM_INIT_AUTOMAKE([parallel-tests])"
+ echo "AM_INIT_AUTOMAKE"
fi
echo "AC_CONFIG_FILES([Makefile])"
} >configure.ac || framework_failure_ "creating configure.ac skeleton"
# -------------------------------------------------------------------------
-# This expects ./defs has already been included has already been included..
+# This code expects test-init.sh has already been included in advance.
ocwd=$(pwd) || fatal_ "getting current working directory"
longpath=this-is/a-path/which-has/quite-a/definitely/truly/long_long_name
#! /usr/bin/env perl
-# Extract the testsuite summary generated by the parallel-tests harness
-# from the output of "make check".
+# Extract the testsuite summary generated by the parallel testsuite
+# harness from the output of "make check".
# Copyright (C) 2012 Free Software Foundation, Inc.
# Check that we are running from a proper directory: last thing we want
# is to overwrite some random user files.
-test -f ../../automake && test -f ../../defs && test -d ../../t \
+test -f ../../automake && test -f ../../runtest && test -d ../../t \
|| fatal_ "running from a wrong directory"
test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
# Auxiliary script for tests on TAP support: checking testsuite summary.
-. ./defs || exit 1
+. test-init.sh
br='============================================================================'
cat > configure.ac <<END
AC_INIT([GNU AutoTAP], [5.12], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
mgn="$esc[0;35m"
brg="$esc[1m"
std="$esc[m"
- echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
else
red= grn= lgn= blu= mgn= brg= std=
fi
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check the testsuite summary with the parallel-tests harness. This
+# Check the testsuite summary with the parallel test harness. This
# script is meant to be sourced by other test script, so that it can
# be used to check different scenarios (colorized and non-colorized
# testsuite output, packages with and without bug-report addresses,
# testsuites in subdirectories, ...)
-. ./defs || exit 1
+. test-init.sh
case $use_colors in
yes)
# Forced colorization should take place also with non-ANSI
# terminals; hence this setting.
TERM=dumb; export TERM
- am_opts='parallel-tests color-tests'
;;
no)
- am_opts='parallel-tests'
;;
*)
fatal_ "invalid use_colors='$use_colors'";;
cat > configure.ac <<END
AC_INIT([GNU AutoFoo], [7.1], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([$am_opts])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
# Backward-compatibility: AC_OUTPUT with arguments.
-. ./defs || exit 1
+. test-init.sh
mkdir sub
: > Makefile.am
# Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
# backward-compatibility.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
.PHONY: test display
# third argument is empty or non-existent.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
# A trick to make the test run muuuch faster, by avoiding repeated
# runs of aclocal (one order of magnitude improvement in speed!).
# AM_INIT_AUTOMAKE are both given two or more arguments.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
empty=''
### Run 2 ###
cat > configure.ac <<'END'
-dnl: 'AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
-dnl: Luckily, 'AC_AUTOCONF_VERSION' and 'm4_version_prereq' are
-dnl: both present in autoconf 2.62, which we require; so that we
-dnl: can at least use the following workaround.
-m4_version_prereq([2.64],
- [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
- [ac_url])],
- [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
- AC_SUBST([PACKAGE_URL], [ac_url])])
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+ [ac_url])],
AM_INIT_AUTOMAKE([am_name], [am_version])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Backward-compatibility test: try to build and distribute a package
-# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
-# and configure.in as autoconf input file.
-# This script can also serve as mild stress-testing for Automake.
-# See also the similar test 'backcompat6.sh'.
-
-am_serial_tests=yes
-am_create_testdir=empty
-. ./defs || exit 1
-
-makefiles='hacky/Makefile src/Makefile data/Makefile tests/Makefile'
-
-# Yuck!
-cat > configure.in <<END
-dnl: Everything here is *deliberately* underquoted!
-AC_INIT(src/foo.input)
-AM_INIT_AUTOMAKE(foo, 1.0)
-AC_CONFIG_FILES(Makefile:mkfile.in)
-AC_OUTPUT($makefiles)
-END
-
-distdir=foo-1.0
-
-cat > mkfile.am <<'END'
-SUBDIRS = src data tests hacky
-installcheck-local:
- grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar
-END
-
-mkdir hacky src tests data
-
-echo 'This is a dummy package' > README
-
-cat > src/foo.input <<'END'
-#!sh
-echo Zardoz
-END
-
-cat > tests/a.test <<'END'
-#!/bin/sh
-"$srcdir/../src/foo" | grep Zardoz
-END
-chmod a+x tests/a.test
-
-cat > data/bar <<'END'
-line1
-line2
-line3
-END
-
-cat >hacky/Makefile.am <<'END'
-dist-hook:
- find $(top_distdir) -print
- chmod a+rx $(top_distdir)/tests/*.test
-END
-
-cat > src/Makefile.am <<'END'
-dist_bin_SCRIPTS = foo
-foo: foo.input
- sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@
- chmod a+x $@
-EXTRA_DIST = foo.input
-DISTCLEANFILES = foo
-END
-
-cat > data/Makefile.am <<'END'
-nodist_data_DATA = bar
-datadir = $(prefix)/data/$(PACKAGE)-$(VERSION)
-bar:
- echo DataDataData >$@
-distclean-local:
- rm -f bar
-END
-
-cat > tests/Makefile.am <<'END'
-TESTS = a.test
-EXTRA_DIST = $(TESTS)
-END
-
-$ACLOCAL -Wno-obsolete
-$AUTOCONF
-$AUTOMAKE -a -Wno-obsolete
-test -f install-sh
-for f in $makefiles; do mv -f $f.in $f.sav; done
-$AUTOMAKE -Wno-obsolete
-for f in $makefiles; do diff $f.sav $f.in; done
-
-./configure
-ls -l . hacky src data tests # For debugging.
-test ! -e mkfile
-$MAKE
-$MAKE distdir
-test ! -e $distdir/Makefile.in
-test ! -e $distdir/data/bar
-test -f $distdir/src/foo
-diff README $distdir/README
-diff mkfile.in $distdir/mkfile.in
-diff tests/a.test $distdir/tests/a.test
-diff src/foo.input $distdir/src/foo.input
-
-$MAKE check
-$MAKE distcheck
-
-test -f $distdir.tar.gz
-
-chmod a-x tests/a.test
-# dist-hook should take care of making test files executables.
-$MAKE distcheck
-
-:
# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
# and 'configure.in' as autconf input file.
# This script can also serve as mild stress-testing for Automake.
-# See also the similar test 'backcompat5.sh'.
+# See also the similar test 'backcompat5.test'.
required=cc
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
# Anyone doing something like this in a real-life package probably
# deserves to be killed.
-cat > configure.in <<'END'
+cat > configure.ac <<'END'
dnl: Everything here is *deliberately* underquoted!
AC_INIT(quux.c)
PACKAGE=nonesuch-zardoz
distdir=nonesuch-zardoz-nonesuch-0.1
$MAKE distdir
test -f $distdir/quux.c
-test ! -e $distdir/foo.got
+test ! -f $distdir/foo.got
$MAKE distcheck
# Test for "\" problems. Bug report from Joerg-Martin Schwarz.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# We must skip the backslash, not complain about './\' not existing.
# Reported by Rick Scott <rwscott@omnisig.com>
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUBDIRS = \
# Make sure we diagnose trailing backslash at the end of a file.
# Report from Akim Demaile <akim@epita.fr>.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
foo = \
# Make sure we diagnose and fix white spaces following backslash.
# Report from Peter Muir.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
# Test to make sure that line number and file name in error message
# referring to variable is always correct.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Test to make sure bad options cause error.
-. ./defs || exit 1
+. test-init.sh
echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
# Test to make sure that programs with bad names are properly
# transformed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure block comments are not double-spaced.
# Report from François Pinard.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
#START
# PR/359.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
# Interaction of BUILT_SOURCES with conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AM_CONDITIONAL([COND1], [test $cond1 = yes])
# Backported to improve coverage of mainline Automake.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Make sure 'install:' honors $(BUILT_SOURCES).
# PR/359.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
# all-recursive-am which depended on BUILT_SOURCES.
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir lib
# Basic test on BUILT_SOURCES.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Test to make sure things that cannot be dist_'ed are diagnosed.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
# PR 511: Make sure we warn about e.g. AC_CONFIG_FILES([./gmakefile]),
# as not all make implementations treat 'file' and './file' equally.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Test to make sure that name canonicalization error works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure name canonicalization happens for texinfo.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = zar-doz.texi
# Yet another canonicalization test.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure name canonicalization happens for static libraries.
# Keep this in sync with sister test 'canon6.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that we allow variable names starting in
# non-letters. Whatever that might mean.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'canon4.sh'.
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Stress test on canonicalization.
required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that canonicalization does not transliterate the '@' charactrer.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# understand '-c -o'.
required=gcc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
;;
esac
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
+# Use '$CC', not 'gcc', to honour the compiler chosen
+# by the testsuite setup.
exec $CC "\$@"
END
# Make sure Automake requires AM_PROG_CC_C_O when either per-targets
# flags or subdir-objects are used.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# Test to make sure 'compile' doesn't call 'mv SRC SRC'.
required=gcc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
;;
esac
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
+# Use '$CC', not 'gcc', to honour the compiler chosen
+# by the testsuite setup.
exec $CC "\$@"
END
# even when the Automake-generated parallel testsuite harness failed.
# See automake bug#9245.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that the testsuite driver (either with or without the
-# parallel-tests option enabled) exports the 'srcdir' value in the
+# serial-tests option enabled) exports the 'srcdir' value in the
# environment of the tests. This is documented in the manual.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
show_info ()
{
# See also related test 'parallel-tests-fd-redirect.sh'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced when the 'parallel-tests' option is not
-# used.
+# installed or referenced when the 'serial-tests' option is used.
am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
-echo 'TESTS = foo.test' > Makefile.am
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = serial-tests
+TESTS = foo.test
+END
$ACLOCAL
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check @substituted@ TESTS.
# Note that in this test, we rely on the .test extension for the
-# substituted names: this is necessary for parallel-tests.
+# substituted names: this is necessary for the parallel harness.
# See also sister test 'check-subst-prog.sh'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([script_tests], ['subst-pass-script.sh subst-xfail-script.sh'])
# well as in builddir, and that is prefers those in the builddir.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
$MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^PASS: .*foo\.test *$' out
else
FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^FAIL: .*foo\.test *$' out
else
# Test Automake style tests.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TESTS = frob.test
# This test only makes sense for the older serial testsuite driver.
am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check skip summary.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# For gen-testsuite-part: ==> try-with-serial-tests <==
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test Automake style tests.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
# Make sure 'make -k check' processes all directories.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([dir/Makefile])
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Also test that Solaris make VPATH rewriting is honored
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# For gen-testsuite-part: ==> try-with-serial-tests <==
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
grep '^[^X]*PASS.* sub/bar' stdout
grep '^[^X]*FAIL.* baz' stdout
grep 'XFAIL.* sub/baz' stdout
-# 'parallel-tests' should not add circular dependencies.
+# The parallel test driver should cause circular dependencies.
# Look for known warnings from a couple of 'make' implementations.
grep -i 'circular.*dependency' stderr && exit 1
grep -i 'graph cycles' stderr && exit 1
# Test for bug where check target doesn't depend on all.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_SCRIPTS = derived
# Test to make sure a clean target depends on previous one.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# Test that := definitions produce warnings, but otherwise work.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
ICONS := $(wildcard *.xbm)
# Test that := in var substitutions works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test that := definitions work as expected at make time.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test for bug reported by Nyul Laszlo. When using the ":" syntax in
# AC_OUTPUT, Automake fails to find the correct file.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_FILES([foo.h:foo.hin])
# Make sure ":" works with files automake generates.
# See also sister test 'colon3.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# This test is for multiple ":"s.
# See also sister test 'colon2.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# rebuild rules.
# Test from Maciej W. Rozycki.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_CONFIG_FILES([zardoz:one:two:three])
# Another multi-":" test, this time from Doug Evans.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Yet another multi-":" test, this time from Ken Pizzini.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Another test for a failing ":" in AC_OUTPUT.
# Report from Maciej Stachowiak.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([colon7], [1.0])
#! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2012 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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure [...] is ok in version number. Report from Jim
-# Meyering.
+# Check that the 'color-tests' option, now active by default, is
+# nonetheless still silently accepted, for backward compatibility.
-. ./defs || exit 1
+. test-init.sh
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o])
+cat >configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([color-tests])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
-: > Makefile.am
+cat >Makefile.am <<END
+AUTOMAKE_OPTIONS = color-tests
+TESTS = foo.test
+END
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
+: > test-driver
$ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
+$AUTOMAKE
+
+:
required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
# Escape '[' for grep, below.
red="$esc\[0;31m"
END
cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
TESTS = $(check_SCRIPTS)
check_SCRIPTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
# Escape '[' for grep, below.
red="$esc\[0;31m"
# Do the tests.
-cat >>configure.ac <<END
+cat >>configure.ac << 'END'
+if $testsuite_colorized; then :; else
+ AC_SUBST([AM_COLOR_TESTS], [no])
+fi
AC_OUTPUT
END
cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
TESTS = $(check_SCRIPTS)
check_SCRIPTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
cat stdout
test_no_color
+ $srcdir/configure testsuite_colorized=false
+
+ TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
+ || { cat stdout; exit 1; }
+ cat stdout
+ test_no_color
+
+ TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE" \
+ expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
+ cat stdout
+ test_color
+
$MAKE distclean
cd $srcdir
# Make sure comments following trailing backslashes are diagnosed.
# Report from Harald Dunkel.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUBDIRS = foo \
# comments following a trailing backslash, even when the combination
# follows a variable assignment that is preceded by a comment.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
# initial comment
# Make sure that '#' as start of word in AUTOMAKE_OPTIONS means
# comment.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = #no such option
# Make sure comment recognition works in PROGRAMS. Report from Mark
# Galassi.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# shell, which in turn can't find '#' as a command.
# Sigh. Some vendors must be destroyed.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
install-data-local:
# Make sure commented variables are output near their comments.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Test for PR/280.
# (Automake should complain about trailing backslashes in comments.)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Automake 1.6.1 seems to have a problem parsing comments that use
# '\' to span multiple lines.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Make sure comment for conditional variables are output near the
# corresponding conditional definitions.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AM_CONDITIONAL([COND], [true])
}' Makefile.in |
grep '@COND_FALSE@VAR = bar'
-:
+:
# Make sure += does not append to a comment.
# Report from Stepan Kasal.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AM_CONDITIONAL([COND1], [true])
# Make sure ##-comments are ignored in variable definitions.
# Report from Julien Sopena.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
TESTS = \
# Make sure Automake ignores in-line comments when using variables,
# but preserve them in the output.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Make sure 'compile' preserves spaces in its arguments.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
# Make sure 'compile' deals correctly with Windows-style paths.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
# with respect to absolute paths.
required='cl'
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
# Make sure the file name translation in the 'compile' script works
# correctly
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
am_create_testdir=empty
required=xsi-lib-shell
-. ./defs || exit 1
+. test-init.sh
get_shell_script compile
# mixed source objects.
# (copied from compile_f_c_cxx.sh) Mike Nolta <mrnolta@princeton.edu>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# mixed source objects.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
# Look for the macros at the beginning of rules.
-$FGREP "$tab\$(COMPILE)" Makefile.in
-$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(F77COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CC)\$(COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
:
# Check basic use of conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# Check basic use of conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# Test for bug in conditionals. From Raja R Harinath.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# This checks that, if LDADD is set from a conditional variable
# and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Test for bug in conditionals.
# Report from Lars J. Aas.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for bug in conditionals.
# Report from Robert Boehne.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Regression test for conditionally defined overriding of automatic rules.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# references.
# Report from Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# according to a conditional.
# Report from Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Regression test for recursion handling in substitution references to
# conditional variables.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check for use of = and += in different conditions.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Regression test for bug when sources listed in conditional.
# Report from Richard Boulton. PR/326.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
CC=false; AC_SUBST([CC])
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AM_CONDITIONAL([COND], [true])
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_SUBST([foo], [bar])
# Check that conditional primaries can use non-conditional directories.
# From Pavel Roskin.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Check that non-conditional primaries can use conditional directories.
# Reported by Juergen Keil.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Check that non-conditional primaries cannot use directories defined
# in some conditions (but not others).
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Check that conditional primaries can use directories defined
# in the same conditions (but not others).
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'EOF'
AM_CONDITIONAL([USE_FOO], [true])
# Test sources listed in conditional.
# Report from Rob Savoye <rob@cygnus.com>, and Lars J. Aas.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([C1], [test -z "$two"])
# Make sure we define conditional _DEPENDENCIES correctly.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_SUBST([CC], [false])
# Make sure the user can override a conditional _DEPENDENCIES.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([C1], [test -z "$two"])
# correctly.
# Report from Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([INC], [test -z "$two"])
# Check for _DEPENDENCIES definition with conditional _LDADD.
# Report from Elena A. Vengerova.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([TWO], [test -n "$two"])
# Report from Roman Fietze.
required='cc lex yacc'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
# Check rules output for parser defined conditionally.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
# Check conditional local rules.
# Report from Simon Josefsson.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], [test -n "$case_A"])
# Check conditional variable ordering.
# Report from Ed Hartnett.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_CONDITIONAL([CASE_A], :)
# Build either as CONFIG_FILE or as PROGRAM.
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# Another sources-in-conditional test. Report from Tim Goodwin.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Test AM_COND_IF.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_DEFUN([FOO],
# AM_COND_IF with an undefined condition should fail.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_COND_IF([BAD_COND], [AC_CONFIG_FILES([file1])])
# This shouldn't happen with user input, as _AM_COND_* are not documented,
# but better to be safe.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND], [:])
# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [:])
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See 'cond23.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AM_CONDITIONAL([COND], [true])
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See 'cond24.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_SUBST([foo], [bar])
# Ensure the right condition is listed after 'else' and 'endif'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([USE_A], [test x = y])
# Yet another sources-in-conditional test. Report from Tim Goodwin.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for an odd conditional bug. Report from Matt Leach.
-. ./defs || exit 1
+. test-init.sh
echo 'AM_CONDITIONAL([FOO], [true])' >> configure.ac
# Test for an odd conditional bug. Report from Pavel Roskin.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
compat=yes
# Test to make sure _PROGRAMS conditionals can be written in a useful
# way.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for bug in conditionals. From Raja R Harinath.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([WRONG], [test x = y])
# Test for bug in conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
dnl Define a macro with the same name as the conditional to exhibit
# Keep this in sync with sister test 'condhook2.sh'.
# Report by Nik A. Melchior (PR/428).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [false])
# Test install when a conditional install-*-hook is defined.
# Keep this in sync with sister test 'condhook.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# Make sure a conditional include statement is handled properly.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TOBE], [false])
# Another test of conditional include statements.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TOBE], [false])
# Test for bug with conditional library.
# From Harlan Stenn.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# Make sure appropriate man install targets generated in all cases.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
man_MANS = foo.1 foo.2
# Make sure conditionals work with man pages.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
# Make sure that config* files are properly regenerated.
-. ./defs || exit 1
+. test-init.sh
echo "FOO = foo" > Makefile.am
# Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
# Report from Alexander Turbov.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
# Make sure empty calls to AC_CONFIG_FILES or AC_CONFIG_HEADERS are diagnosed.
-. ./defs || exit 1
+. test-init.sh
-# We avoid using configure.ac stub initialized by ./defs, since we need
-# to keep track of line numbers (to grep for error messages).
+# We avoid using configure.ac stub initialized by our testsuite setup, as
+# we need to keep track of line numbers (to grep for error messages).
cat > configure.ac << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
# broken in that case.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Test to make sure config headers in subdirectories are cleaned.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
+AC_CONFIG_HEADERS([sub/config.h:sub/config.hin])
AC_OUTPUT
END
# Test to make sure config.h works in a subdir.
# Report from Alexandre Oliva.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_OUTPUT
END
# Use AM_CONFIG_HEADER(subdir/config.h) to place configuration
# header in subdirectory and observe that it is not included.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([include/Makefile])
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_PROG_CC
END
# Make sure we do not distribute header sources when they are built.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([FOO], [NameToBeGrepped])
# idea is that if config.h is in a subdir, and there is no Makefile in
# that subdir, then we want to build config.h as the top level.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([subdir/config.h])
+AC_CONFIG_HEADERS([subdir/config.h])
AC_OUTPUT
END
# Test to make sure several config headers are allowed.
# See also sister "semantic" test 'confh8.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([config.h two.h])
+AC_CONFIG_HEADERS([config.h two.h])
END
: > Makefile.am
# Test to make sure several config headers are allowed.
# See also sister "minimalistic" test 'confh7.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([one.h two.h])
+AC_CONFIG_HEADERS([one.h two.h])
AC_OUTPUT
END
# Diagnose if both configure.in and configure.ac are present, prefer
# configure.ac.
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<EOF
AC_INIT([$me], [1.0])
# If config.h is not used, @CONFIG_INCLUDE_SPEC@ should not appear
# in Makefile.in.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure links created by AC_CONFIG_LINKS get removed with
# 'make distclean'
-. ./defs || exit 1
+. test-init.sh
echo 'SUBDIRS = sdir' > Makefile.am
: > src
# Test to make sure that sources for links created by AC_CONFIG_LINKS
# are distributed.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUBDIRS = sdir
# Test to make sure that AC_CONFIG_LINKS using a variable source
# is not broken.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUBDIRS = sdir
# Test to make sure links to _identical files_ created by AC_CONFIG_LINKS get
# removed with 'make distclean' only if doing a VPATH build.
-. ./defs || exit 1
+. test-init.sh
mkdir nonmk-subdir sdir sdir/mk-subdir
: > src
# Test to make sure config.h can be in subdir.
# Also, make sure config.h is properly rebuilt.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
-AM_CONFIG_HEADER([subdir/config.h:subdir/config.hin])
+AC_CONFIG_HEADERS([subdir/config.h:subdir/config.hin])
AC_OUTPUT
END
# Test to make sure configure_vars stuff works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([QBERT])
# Test for bug reported by Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([OTHER_SCRIPTS])
# Test to make sure '-c' works. Report from Andris Pavenis.
# See also the much more in-depth test 'add-missing'.
-. ./defs || exit 1
+. test-init.sh
# We'll have to cater to systems like MSYS/MinGW where there are no
# true symlinks ('ln -s' behaves like 'cp -p'); see automake bug#10441.
# Test cscope functionality.
-. ./defs || exit 1
+. test-init.sh
plan_ 18
# The 'cscope' target should not fail if there are no sources.
required=
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# is empty.
required=cscope
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
required=c++
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([GNU C++ Demo], [1.3], [bug-automake@gnu.org])
required='libtoolize c++'
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([GNU C++/Libtool Demo], [0.73], [bug-automake@gnu.org])
# Test that '.c++' extension works.
# From Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test that Automake suggests using AC_PROG_CXX if C++ sources are used.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >>configure.ac
# Make sure automake sees AC_PROG_CXXCPP. From Garth Corral.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXXCPP
# Test to make sure LIBOBJS and C++ sources work right.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test to make sure C++ linker is used when appropriate.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure pure C++ sources don't include C-specific code.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode disables automatic dependency tracking.
-# And check that this *cannot* be overridden.
-
-required=cc
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-.PHONY: test-nodeps
-test-nodeps:
- test ! -d .deps
- test ! -d _deps
- test ! -d '$(DEPDIR)'
-END
-
-cat > foo.c <<'END'
-#include "bar.h"
-int main ()
-{
- GIVE_BACK 0;
-}
-END
-
-cat > bar.sav <<'END'
-#define GIVE_BACK return
-END
-
-cp bar.sav bar.h
-
-$ACLOCAL
-$AUTOMAKE --include-deps --cygnus --include-deps
-$AUTOCONF
-
-# Unknown options should cause just warnings from configure.
-./configure --enable-dependency-tracking
-$MAKE
-$MAKE test-nodeps
-
-: > bar.h
-$MAKE
-$MAKE test-nodeps
-
-# Sanity check.
-$MAKE clean
-$MAKE >out 2>&1 && { cat out; exit 1; }
-cat out
-# Not all compilers mention the undefined symbol in the error message.
-grep GIVE_BACK out || grep main out
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that 'cygnus' mode imply 'foreign' mode.
-
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-# This is *required* in cygnus mode
-AM_MAINTAINER_MODE
-END
-
-$ACLOCAL
-
-: > Makefile.am
-
-# We want complete control automake flags, while honouring the
-# user overrides for $AUTOMAKE.
-AUTOMAKE="$am_original_AUTOMAKE -Wno-obsolete"
-
-# Sanity check: gnu mode must complain about missing files and
-# portability problems.
-AUTOMAKE_fails
-grep 'required file.*README' stderr
-
-# But cygnus mode should imply foreign mode, so no complaints.
-# And cygnus mode should by able to override gnu and gnits modes.
-$AUTOMAKE --cygnus -Werror
-$AUTOMAKE --gnu --cygnus -Werror
-$AUTOMAKE --gnits --cygnus -Werror
-
-# Try again, this time enabling cygnus mode from Makefile.am.
-cp Makefile.am Makefile.sav
-echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
-$AUTOMAKE -Werror
-mv -f Makefile.sav Makefile.am
-
-# Try again, this time enabling cygnus mode from configure.ac.
-cp configure.ac configure.sav
-sed 's/^AM_INIT_AUTOMAKE/&([gnits cygnus])/' configure.sav >configure.ac
-cmp configure.ac configure.sav && fatal_ 'failed to edit configure.ac'
-
-$ACLOCAL --force
-$AUTOMAKE -Werror
-mv -f configure.sav configure.ac
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode forbids creation of distribution tarball.
-
-. ./defs || exit 1
-
-echo AM_MAINTAINER_MODE >> configure.ac
-mv -f configure.ac configure.stub
-
-cat configure.stub - > configure.ac <<'END'
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
-
-./configure
-$MAKE
-
-for target in dist distdir distcheck dist-all dist-gzip; do
- $MAKE -n $target >out 2>&1 && { cat out; exit 1; }
- cat out
- grep $target out
-done
-
-# Now check that cygnus mode in a subdirectory disables
-# distribution-building in that subdirectory.
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-END
-
-mkdir sub1 sub2
-: > sub1/Makefile.am
-cat > sub2/Makefile.am <<'END'
-# The '-Wall' after 'cygnus' should ensure no warning gets
-# unintentionally disabled. We are particularly interested
-# in override warnings, for when (below) we add the 'distdir'
-# target.
-AUTOMAKE_OPTIONS = cygnus -Wall
-# This is required because the 'cygnus' option is now deprecated.
-AUTOMAKE_OPTIONS += -Wno-obsolete
-END
-
-cat configure.stub - > configure.ac <<'END'
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE
-cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; exit 1; }
-grep distdir out
-cd ..
-
-cat >> sub2/Makefile.am <<'END'
-distdir:
-END
-$AUTOMAKE sub2/Makefile
-./config.status sub2/Makefile
-
-$MAKE distdir
-$MAKE dist
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2010-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that cygnus mode enables the 'no-installinfo' option.
-
-required=makeinfo
-. ./defs || exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-info_TEXINFOS = foo.texi
-END
-
-cat > foo.texi <<'END'
-@setfilename foo.info
-END
-
-$ACLOCAL
-# -Wno-override works around a buglet in definition of $(MAKEINFO)
-# in cygnus mode; see also xfailing test 'txinfo5.test'.
-# -Wno-obsolete accounts for the fact that the cygnus mode is now
-# deprecated.
-$AUTOMAKE --cygnus -Wno-override -Wno-obsolete
-$AUTOCONF
-
-cwd=$(pwd) || exit 1
-./configure --prefix="$cwd"/_inst
-$MAKE
-$MAKE install
-test ! -e _inst
-test ! -e foo.info
-test ! -e _inst/share/info
-$MAKE install-info
-ls -l _inst
-test -f foo.info
-test -f _inst/share/info/foo.info
-
-:
# That feature will be removed in the next major Automake release.
# See automake bug#11034.
-. ./defs || exit 1
+. test-init.sh
-warn_rx='support for Cygnus.*trees.*deprecated'
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AM_MAINTAINER_MODE
-END
+warn_rx='support for Cygnus.*trees.*removed'
$ACLOCAL
-$AUTOCONF
-
-: > Makefile.am
-# 'cygnus' option from command line
-$AUTOMAKE --cygnus -Wno-obsolete
-AUTOMAKE_fails --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails --cygnus -Wnone -Wobsolete
-grep "^automake.*: .*$warn_rx" stderr
-
-rm -rf autom4te*.cache
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
# 'cygnus' option in Makefile.am
echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
-cat Makefile.am # For debugging.
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^Makefile\.am:1:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^Makefile\.am:1:.*$warn_rx" stderr
rm -rf autom4te*.cache
sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
diff configure.ac t && fatal_ "failed to edit configure.ac"
mv -f t configure.ac
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^configure\.ac:2:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^configure\.ac:2:.*$warn_rx" stderr
:
# Test basic Cygwin32 functionality.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure '-' can be used in path.
# Report from Matthew D. Langston.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
include Make-lang
# Make sure aclocal picks up on all macro definitions.
-. ./defs || exit 1
+. test-init.sh
cat > acinclude.m4 << 'END'
AC_DEFUN([AM_FUNC_THREE])
# Make sure we don't mistake a macro definition for an invocation.
# From Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
dnl if buggy this will require getloadavg.c
# to an absolute path.
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# (both as TCL variable and as environment variable).
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
# site.exp in the same order in which they're listed in that variable.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# automake-generated Makefile.
required=runtest
-. ./defs || exit 1
+. test-init.sh
write_check_for ()
{
# Check that the user can edit the Makefile-generated site.exp, and
# have its edits survive to the remaking of that file.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Superficial test to check that dejagnu tests and automake-style
# tests can coexist. See also related deeper test 'check12.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
# Make sure we don't override the user's site.exp rule.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Check that the DejaGnu rules work for a simple program and test case.
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat > hammer << 'END'
#! /bin/sh
# previous tools, but at first glance "make check" has passed.
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat > hammer << 'END'
#! /bin/sh
# the package by default.
required=runtest
-. ./defs || exit 1
+. test-init.sh
package=$me
# Check that "make check" fails, when a DejaGnu test fails.
required=runtest
-. ./defs || exit 1
+. test-init.sh
cat > faildeja << 'END'
#! /bin/sh
# (to detect TCL errors) on a file with TCL errors.
required=runtest
-. ./defs || exit 1
+. test-init.sh
runtest --help | grep '.*--status' \
|| skip_ "dejagnu lacks support for '--status'"
# erroring out when a still-required file is missing.
# See also discussion about automake bug#9768.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# erroring out when a still-required file is missing.
# See also discussion about automake bug#9768.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
m4_include([foobar.m4])
# Test to make sure dependencies work when required macro is part of
# autoconf.
-. ./defs || exit 1
+. test-init.sh
echo 'AM_FOO' >> configure.ac
echo 'AC_DEFUN([AM_FOO], [AC_REQUIRE([AC_HEADER_STDC])])' > AM_FOO.m4
# Make sure a top-level depcomp file is found when
# AC_CONFIG_AUX_DIR is not specified.
-. ./defs || exit 1
+. test-init.sh
mkdir lib src
# Test to make sure depcomp is installed and found properly
# when required for multiple directories.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# From Pavel Roskin.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# same thing for libtool objects.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# same thing for non-libtool objects.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# From Eric Magnien.
required=cc
-. ./defs || exit 1
+. test-init.sh
rm -f configure.ac
# In some cases the auto-dependency can get confused and try
# to '-include' a directory (if a backslash-newline appears in _SOURCES).
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# Test _DEPENDENCIES variable. From Lee Iverson.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that dependencies are included when there are many header files.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# quoting in $CONFIG_FILES, done by newer Autoconf.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << END
AC_PROG_CC
depdir=
fi
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
+# For the fun of it, we should also cope with Makefile names
+# that contain weird characters and newer.
# Pick the first name that the file system will accept.
for name in \
'weird name with $ `#() &! characters"' \
# Check for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
# reported by Markus Duft.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << END
AC_PROG_CC
# Check that automake and autoconf complain about an old-style AC_INIT
# call used with a new-style AM_AUTOMAKE_INIT call.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# It will only work for non-root users.
required='ro-dir'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Naming a subdirectory 'obj/' is a bad idea. Automake should say so.
-. ./defs || exit 1
+. test-init.sh
mkdir obj
# Check use of absolute paths in dirlist.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
mkdir acdir-more sub sub/acdir
echo "$(pwd)/acdir-more" > sub/acdir/dirlist
# Check dirlist support.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat >dirlist-test/dirlist-check.m4 <<'END'
AC_DEFUN([AM_INIT_GUILE_MODULE],[
. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
grep 'GUILE-VERSION' configure
# This bug can occur only when we do a VPATH build of Automake
-# (because of the '-I' passed to aclocal in tests/defs/aclocal.in) but
-# it's OK because VPATH builds are done by 'make distcheck'.
+# but it's OK because VPATH builds are done by 'make distcheck'.
grep 'I should not be included' configure && exit 1
:
# Check dirlist globbing support.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
AM_FOO_BAR
EOF
mkdir dirlist21-test dirlist22-test
cat >dirlist21-test/dirlist21-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE],[. $srcdir/../GUILE-VERSION])
END
cat >dirlist22-test/dirlist22-check.m4 <<'END'
# Test to make sure LIBOBJS file cannot be mentioned explicitly.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_RANLIB
am_create_testdir=empty
required=cc
-. ./defs || exit 1
+. test-init.sh
count=0
ocwd=$(pwd) || fatal_ "cannot get current working directory"
unindent > configure.ac << END
AC_INIT([$me], [$count])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([parallel-tests])
+ AM_INIT_AUTOMAKE
AC_PROG_CC
# We don't want to require python or emcas in this test, so
# the tricks below.
foo_SOURCES = foo.c
## For py-compile.
python_PYTHON = bar.py
- ## For elisp-comp.
- lisp_LISP = baz.el
## For test-driver.
TESTS =
END
missing
depcomp
py-compile
- elisp-comp
test-driver
'
# Related to automake bug#9651.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# directory was set to '.' by AC_CONFIG_AUX_DIR.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
i=0
for auxdir in build-aux ''; do
# archives.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 70
# Make sure included files in parent directory are distributed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# required '.am' file from a distribution tarball.
# See discussion about automake bug#9768.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# See discussion about automake bug#9768.
# See also sister test 'dist-missing-m4.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
m4_include([foobar.m4])
# See discussion about automake bug#9768.
# See also sister test 'dist-missing-included-m4.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
m4_pattern_forbid([^MY_])
# so that the latter ones fail.
required=bzip2
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
: > Makefile.am
# This test expect the user to be unable to write on files lacking
# write permissions -- so it won't work if the user is 'root'.
required='non-root cc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# The distdir target should take care of not copying it more than one
# time anyway.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
# time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
# passed down to the configure script of the subpackage. This is
# explicitly documented in the manual.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SUBDIRS([subpkg])
# Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
# Check basic support for distcheck-hook.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Automake, and that a used-defined 'distcheck-hook' is *not* honored
# in a subpackage Makefile.am.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SUBDIRS([subpkg])
# missing from the dist tarball (interaction with '--install').
# See automake bug#9037.
-. ./defs || exit 1
+. test-init.sh
cwd=$(pwd) || fatal_ "cannot get current working directory"
# files in a dist tarball (interaction with '--install').
# See automake bug#9037.
-. ./defs || exit 1
+. test-init.sh
cwd=$(pwd) || fatal_ "cannot get current working directory"
# working. Related to automake bug#9579.
required='makeinfo tex texi2dvi install-info'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# by a process (e.g., that is its "current working directory").
# See automake bug#10470.
-. ./defs || exit 1
+. test-init.sh
mkdir foo.d
sh -c "cd foo.d && sleep '4'" &
# Check against automake bug#9579: distcheck does not always detect
# incomplete uninstall as advertised.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# case too (since it doesn't cost us anything but this test).
# See automake bug#10878.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# The example Makefile.am we use is from the FAQ entry 'distcleancheck'.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'END'
AC_PROG_CC
# Test to make sure that if an auxfile (here depcomp) is required
# by a subdir Makefile.am, it is distributed by that Makefile.am.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# FIXME: the logic of this check and other similar ones in other
# FIXME: 'distcom*.sh' files should be factored out in a common
-# FIXME: subroutine in 'defs'...
+# FIXME: subroutine in 'am-test-lib.sh'...
sed -n -e "
/^DIST_COMMON =.*\\\\$/ {
:loop
# Report from Pavel Roskin. Report of problems with '--no-force' from
# Scott James Remnant (Debian #206299)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
for dir in . subdir; do
# FIXME: the logic of this check and other similar ones in other
# FIXME: 'distcom*.sh' files should be factored out in a common
- # FIXME: subroutine in 'defs'...
+ # FIXME: subroutine in 'am-test-lib.sh'...
sed -n -e "
/^DIST_COMMON =.*\\\\$/ {
:loop
# Test to make sure that non-existing common files are distributed
# if they are buildable.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
README:
# This tries to distribute a file from a subdirectory, without
# Makefile in that directory. 'distcom5.sh' performs the same
# test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
test 1 -eq $(grep -c tests dc.txt)
grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
:
# a Makefile in that directory. 'distcom4.sh' performs the same
# test without Makefile in the directory.
-. ./defs || exit 1
+. test-init.sh
extract_distcommon ()
{
# Also test DISTFILES containing a directory and a file in it,
# and repeated directories.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that 'dist-hook' works. See automake bug#10878.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Check that distributed symlinks in the source tree will be expanded
# as regular files in $(distdir).
-. ./defs || exit 1
+. test-init.sh
echo text > file
# Check that distributed broken symlinks cause 'make dist' to fail, and
# to do so with (mostly) meaningful diagnostic.
-. ./defs || exit 1
+. test-init.sh
# We need, for our broken symlinks, names that make it hard to get false
# positives when grepping make output to look for them.
# From Rainer Orth.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([a.c])
# Simple checks on the 'AM_WITH_DMALLOC' macro.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_HEADERS([config.h])
# See: <http://lists.gnu.org/archive/html/automake/2010-08/msg00074.html>
# or: <http://thread.gmane.org/gmane.comp.sysutils.automake.general/11943/focus=11962>
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
$(FOO:=x): bar
# If you cause some parts of this test to fail, chances are that you've
# improved the Automake parser ;-)
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<END
.PHONY: test
# 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
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# containing a '$' on the left hand side of an assignment are not
# portable in practice, even though POSIX allows them. :-/
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<'EOF'
x = 1
EOF
$ACLOCAL
+
AUTOMAKE_fails -Wportability
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
grep 'Makefile.am:6' stderr
grep 'Makefile.am:7' stderr
-# On the other hand, if we allow 'silent-rules' mode, then we need to
-# allow recursive variable expansion, too.
-
-# This should work with the AM_SILENT_RULES macro.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-
-$ACLOCAL --force
-AUTOMAKE_fails -Wportability
+AUTOMAKE_fails -Wportability -Wno-portability-recursive
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
grep 'Makefile.am:4' stderr
# Test to make sure that -Wportability turns on portability-recursive,
# likewise for -Wno-...
-. ./defs || exit 1
+. test-init.sh
#
# First, try a setup where we have a 'portability-recursive' warning,
# Test to make sure listing a program twice is ok.
# Report from Manu Rouat.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# Make sure aclocal only warns about definitions overridden by acinclude.m4.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_FUNC_STRTOD
# Test to make sure line numbers are correct in some error reports.
-. ./defs || exit 1
+. test-init.sh
echo 'AM_CONDITIONAL(FOO, true)' >> configure.ac
# Test for bug where if the list of installables is empty, invalid sh
# code is generated.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
echo 'data_DATA =' >Makefile.am
# A test for missing _SOURCES variable. Also test to make sure empty
# _SOURCES suppresses assumption about default name.
-. ./defs || exit 1
+. test-init.sh
plan_ 5
# Check to make sure new extended directory mechanism works.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
htmldir = $(prefix)/html
# Test to make sure undefined directories are invalid.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
quuz_DATA = zot.html
# Test to make sure pkgdatadir can be overridden via AC_SUBST.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_SUBST([pkgdatadir], ["FOO"])
# aren't left around. Report from Jim Meyering.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure no-exeext option works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure we can override a program rule.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# programs, but not to @substitutions@.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test -n "$cond"])
# Test to make sure EXTRA_..._SOURCES actually works.
# Bug report from Henrik Frystyk Nielsen.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# Test to make sure extensions are set correctly for various languages.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
AC_PROG_FC
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_UPC
END
# Using different extensions for the same language should not
# output the build rules several times.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CXX
# In both cases, we don't try to create a rule; but we shouldn't
# fail either, because magic might be happening behind our back.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
END
# 2. '-Wno-portability' must imply '-Wno-extra-portability'.
# 3. '-Wall' must imply '-Wextra-portability'.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# Make sure that extra-portability warnings are not enabled by --gnits,
# --gnu and --foreign.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Check interactions between the 'portability-recursive' and
# 'extra-portability' warning categories.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# This check has been introduced in commit 'Release-1-9-254-g9d0eaef'
# into the former test 'subst2.test'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([Makefile2 Makefile3])
# targets should always be generated. However, they should not be
# built by default.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# with the involvement of the $(wildcard) GNU make builtin.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Suggested by observations from Braden McDaniel.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Suggested by observations from Braden McDaniel.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Check to make sure EXTRA_foo_SOURCES not defined unnecessarily.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check to make sure EXTRA_DATA not required.
-. ./defs || exit 1
+. test-init.sh
echo 'AC_SUBST(CODICIL)' >> configure.ac
# Check to make sure EXTRA_DATA can be specified.
-. ./defs || exit 1
+. test-init.sh
echo 'AC_SUBST(CODICIL)' >> configure.ac
# Check to make sure EXTRA_DIST can contain a directory from $buildir.
# From Dean Povey.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Check to make sure EXTRA_DIST can contain a directory or
# a subdirectory, in $(builddir) or $(srcdir).
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# $(srcdir)/X and ./X, with the files from the later overriding the
# files from the former.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# and that referring to the same program with inconsistent addition
# of $(EXEEXT) works, too.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# are missing; but only if the former is not AC_SUBSTed itself
# (lib_LIBRARIES is in the same boat here).
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Test EXTRA_*_DEPENDENCIES. See extradep2 for libtool variant.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test EXTRA_*_DEPENDENCIES, libtool version; see 'extradep.sh'.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure programs with only Fortran 90 source are handled properly.
# (copied from 'fonly.sh') Mike Nolta <mrnolta@princeton.edu>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_FC
# options like '--ignore-deps' and '--silent-rules' are preserved across
# automake reruns.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
done
-# Cygnus mode is deprecated now, and must be handled separately.
-$AUTOMAKE --cygnus -Wno-obsolete
-./configure --enable-maintainer-mode
-grep " --cygnus" Makefile
-$MAKE
-# Two code paths in configure.am:
-# - either a file in $(am__configure_deps) has been updated ...
-$sleep
-touch aclocal.m4
-$MAKE
-grep " --cygnus" Makefile
-# - ... or not; i.e., Makefile.am or an included file has.
-$sleep
-touch Makefile.am
-$MAKE
-grep " --cygnus" Makefile
-
:
# Make sure 'AC_F77_LIBRARY_LDFLAGS' works properly.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
# Check the filename-length-max=99 option.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# PR 507: Check the filename-length-max=99 option
# in conjunction with AC_CONFIG_SUBDIRS.
-. ./defs || exit 1
+. test-init.sh
# The name is so that 99 is exactly hit (including final \0).
subdirname='cnfsubdir'
# C-specific code.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
# Make sure programs with only Fortran 77 source are handled properly.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
# Test to make sure that 'automake --force-missing' works.
-. ./defs || exit 1
+. test-init.sh
rm -f install-sh
# Test to make sure that 'automake --force-missing' works, even with
# symlinked files.
-. ./defs || exit 1
+. test-init.sh
rm -f install-sh
# Test that Automake suggests using AC_PROG_F77/FC if Fortran sources
# are used.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<END
bin_PROGRAMS = hello
# Cf. 'fort1.sh' and 'link_f90_only.sh'.
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# For now, require the GNU compilers (to avoid some Libtool/Autoconf
# issues).
required='g77 gfortran'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# For now, require the GNU compilers (to avoid some Libtool/Autoconf
# issues).
required='libtoolize g77 gfortran'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# Test to make sure dependency tracking doesn't interfere with Fortran.
# For PR 75.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SRCDIR([foo.f])
# Test of compiled java.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
_AM_DEPENDENCIES([GCJ])
# Make sure '..' invalid in subdir .o's.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
_AM_DEPENDENCIES(GCJ)
# Make sure dependency tracking works for java.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
_AM_DEPENDENCIES([GCJ])
# Make sure dependency tracking works for Java.
required=gcj
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_GCJ
# Make sure Automake suggests AM_PROG_GCJ when GCJ is needed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
_AM_DEPENDENCIES(GCJ)
# AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set.
required='gcj'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_GCJ
# we won't have to ask him for more information to start analyzing the
# failure (that had happened too many times in the past!).
-. ./defs || exit 1
+. test-init.sh
st=0
if test -d "$am_top_srcdir"/.git; then
# to the test cases requiring them.
# See also automake bug#9807.
-. ./defs || exit 1
+. test-init.sh
extract_program_version ()
{
fi
fi
-. ./get.sh
-
cat >> get.sh <<'END'
# Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
# m4 macro. So we need the following to avoid spurious errors.
AUTOMAKE="$AUTOMAKE -Wno-obsolete"
END
+. ./get.sh
+
$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
# We need to use '-Wno-syntax', since we do not want our test suite
# to fail merely because some third-party '.m4' file is underquoted.
# Check gettext support.
required='gettext'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AM_GNU_GETTEXT
# PR/338, reported by Charles Wilson.
required='gettext'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AM_GNU_GETTEXT([external])
# Check gettext 'AM_GNU_GETTEXT_INTL_SUBDIR' support.
required='gettext'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AM_GNU_GETTEXT([external])
# Test to ensure --gnits version checking is correct.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [3.5.3.2])
# Test to ensure std-options checking is correct.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Report from Braden McDaniel.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/GNUmakefile])
# Check that Automake warns about user variables being overridden.
-. ./defs || exit 1
+. test-init.sh
# We need (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# Check diagnostics about no-installman being disallowed in 'gnu'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([gnuwarn2], [1.0])
# Test to make sure header vars defined only once when including.
# Report from Marcus G. Daniels.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# in the HEADERS variable for *all* generated Makefile.ins in the
# project.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([MY_HEADERS])
# the configure help screen.
# Keep this in sync with sister test 'help-depend2.sh'
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# dependency tracking, it adds proper text to the configure help screen.
# Keep this in sync with sister test 'help-depend.sh'
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our macro 'AM_WITH_DMALLOC' adds proper text to
# the configure help screen.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our grand macro 'AM_INIT_AUTOMAKE' add proper text
# to the configure help screen.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that our macro 'AM_PATH_LISPDIR' adds proper text to
# the configure help screen.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure that macro 'AM_PATH_PYTHON' adds proper text to the
# configure help screen.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure that our macro 'AM_SILENT_RULES' adds proper text to
-# the configure help screen.
+# Make sure configure options relative to automake silent rules are
+# added to the configure help screen.
-. ./defs || exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_SILENT_RULES
-END
+. test-init.sh
+: > Makefile.am
$ACLOCAL
-mv -f configure.ac configure.tmpl
+cp configure.ac configure.tmpl
-for args in '' '([])' '([yes])' '([no])'; do
- sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.ac
- cat configure.ac
+for args in '' 'yes' 'no'; do
+ cp -f configure.tmpl configure.ac
+ test x"$args" = x || echo "AM_SILENT_RULES([$args])/" >> configure.ac
+ cat configure.ac # For debugging.
$AUTOCONF --force
grep_configure_help --enable-silent-rules \
' less verbose build.*\(undo.*"make V=1".*\)'
# Make sure that our macro 'AM_PROG_UPC' adds proper text to
# the configure help screen.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure --help and --version work, even when no configure.ac nor
# configure.in is in the current directory.
-. ./defs || exit 1
+. test-init.sh
# Ensure we run in an empty directory.
mkdir emptydir
# Make sure --help and --version work, even when the current directory
# contains a broken configure.ac and a broken acinclude.m4.
-. ./defs || exit 1
+. test-init.sh
# Ensure we run in a new, clean directory.
mkdir cleandir
# Make sure --help and --version takes precedence over other options.
-. ./defs || exit 1
+. test-init.sh
# We must have full control over the content of the current directory.
mkdir cleandir
# Check that the first among --help and --version to be specified on
# the command line takes precedence over the following one.
-. ./defs || exit 1
+. test-init.sh
# Ensure we run in an empty directory.
mkdir emptydir
# Darwin).
# Report from Peter O'Gorman.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
: >CHANGELOG
# Test to make sure implicit .o's are listed as appropriate. Report
# from Henrik Frystyk Nielsen.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure we give a sensible error message when AC_INIT and
# AM_INIT_AUTOMAKE are both given less than two arguments.
-. ./defs || exit 1
+. test-init.sh
for ac_init_args in '' '([x])'; do
for am_init_args in '' '([1.10])'; do
# Make sure we give a sensible error message when AM_INIT_AUTOMAKE
# contains junk.
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
AC_INIT([init2], [1.0])
# Test for bug where install-sh not included in distribution.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# FIXME: and could be merged with 'txinfo27.sh'.
required=makeinfo
-. ./defs || exit 1
+. test-init.sh
cwd=$(pwd) || fatal_ "cannot get current working directory"
# From Pavel Roskin.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# installdirs is missing this. Ideally this would be an automatic
# feature of any exported target.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test to see if defining INSTALL_DATA causes problems. From EGCS
# list.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_SUBST([INSTALL_DATA])
# Test that installing under $exec_prefix is handled by install-exec.
# Testing with headers for instance.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am << 'EOF'
# User directories.
# Check against automake bug#10997: directories holding only
# conditionally-installed files should not be created unconditionally.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([ENABLE_FOO], [false])
# FIXME: So this test is still xfailing.
# See sister test 'instdir-cond.sh' for the succeeding part.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([ENABLE_FOO], [false])
# If $(javadir) is the empty string, then nothing should be installed there.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# If $(lispdir) is the empty string, then nothing should be installed there.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_PATH_LISPDIR
# This test exercises the libtool code paths.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# An empty "foo_PRIMARY" declaration should *not* cause "make install"
# to create directory $(foodir). See automake bug#10997 and bug#11030.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_SUBST([CC], [whatever])
# This test exercises the prog and libs code paths.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# If $(pythondir) is the empty string, then nothing should be installed there.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_PATH_PYTHON
# If $(infodir) is the empty string, then nothing should be installed there.
# Likewise for the other install-* targets used for texinfo files.
-required='makeinfo-html tex texi2dvi'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
dvips --help \
|| skip_ "dvips is missing"
# This test only ensures this if $(foo_PRIMARY) is also empty, see
# 'instdir2.sh' and siblings 'instdir-*.sh' for nonempty contents.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
# This test ensures this also if $(foo_PRIMARY) is nonempty, see
# 'instdir.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_SUBST([foodir], ['${datadir}'/foo])
# Test for this bug: when a Makefile.am builds nothing, no
# install-exec target is generated.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# This test has a few sister tests, for java, info, libtool.
required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AC_OUTPUT
# This is the java sister test of 'instfail.sh'.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# This is the libtool sister test of 'instfail.sh'.
required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AM_PROG_AR
# This test has a few sister tests, for java, info, libtool.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AC_PROG_CC
# Make sure the install-exec-hook example we give in the manual works.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_PROG_LN_S
# Make sure the MKDIR_P invocation is correct in install-man
# target. Bug reported by Gordon Irlam <gordoni@cygnus.com>.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test to make sure mkinstalldirs invocation correct in install-man
# target. Bug reported by Gordon Irlam <gordoni@cygnus.com>.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
man8_MANS = frob.8
# This is the mans sister test of 'instmany.sh', see there for details.
-. ./defs || exit 1
+. test-init.sh
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
# This is the python sister test of 'instmany.sh', see there for details.
required='python'
-. ./defs || exit 1
+. test-init.sh
limit=2500
subdir=long_subdir_name_with_many_characters
# For texinfos, we expand names using $(srcdir) in the first place.
# Let's hope nobody uses many texinfos.
-. ./defs || exit 1
+. test-init.sh
# In order to have a useful test on modern systems (which have a high
# limit, if any), use a fake install program that errors out for more
# automake: Makefile.am: required file "../../install-sh" not found; installing
# This also makes sure that install-sh is created in the correct directory.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
rm -f install-sh
# Various install-sh checks.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
get_shell_script install-sh
am_create_testdir=empty
required=non-root
-. ./defs || exit 1
+. test-init.sh
# Solaris /usr/ucb/touch does not accept -t.
touch -t $old_timestamp foo \
# Original report from James Amundson about file names with spaces.
# Other characters added by Paul Eggert.
-. ./defs || exit 99
+. test-init.sh
# Usage: is_in_list ITEM [LIST...]
is_in_list ()
# Test to make sure variable interpolation works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure variable interpolation doesn't break other
# features. Report from Joel N. Weber, II.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See automake bug#8234.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test cleaning of Java class files and timestamps.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Test on compilation and installation of Java class files.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_OUTPUT
# This test uses a "flat" setup for the source tree (i.e., everything in
# the top-level directory), and forces the use of the old, non-parallel
# testsuite driver. The sister test 'java-compile-run-nested.sh' do
-# similar checks with a more usual, "nested" setup, and using the newer
-# 'parallel-tests' driver.
+# similar checks with a more usual, "nested" setup, and using the older
+# 'serial-tests' driver.
required='java javac'
am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# Also meddle with wrapper scripts, as would be probably seen in a real
# "UNIX-style" use case.
# This test uses a typical "nested" source tree setup (i.e., different
-# components/aspects are separated into different subdirectories),
-# and uses the 'parallel-tests' testsuite driver. The sister test
-# 'java-compile-run-flat.sh' do similar checks with a "flat" setup
-# (i.e., everything in the top-level directory), and forcing the use
-# of the older non-parallel 'simple-tests' driver.
+# components/aspects are separated into different subdirectories), and
+# uses the parallel testsuite driver.
+# The sister test 'java-compile-run-flat.sh' do similar checks with
+# a "flat" setup (i.e., everything in the top-level directory), and
+# forcing the use of the older 'serial-tests' driver.
required='java javac'
-. ./defs || exit 1
+. test-init.sh
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# compilation time. See automake bug#9306.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
# conditionals).
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
# modifiers. Also check that '.java' files are not distributed by
# default.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test that some Java-related variables and rules are not repeatedly
# defined.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
javadir = $(datadir)/java
# Test support of 'nobase_' with the 'JAVA' primary.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# be installed.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test rebuild rules for Java class files.
required='javac'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Test definition of automake-generated private Makefile variable
# '$(am__java_sources)'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check uninstallation of Java class files.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Minimal test of Java functionality.
required=javac
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_OUTPUT
# no classes to compile.
# Report from Braden McDaniel.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL(WITH_JDK, false)
# *.java files when there are none.
# Report from Johannes Nicolai (PR/441).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([WHO_CARES], [false])
# the *.class files).
# See automake bug#8461.
-. ./defs || exit 1
+. test-init.sh
$ACLOCAL
# Check support for $(JAVACFLAGS) and $(AM_JAVACFLAGS).
-. ./defs || exit 1
+. test-init.sh
cat > fake-javac <<'END'
#!/bin/sh
# Test to make sure JAVA variable can be defined by AC_SUBST.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([JAVA])
# Test to make sure redefining JAVAC with AC_SUBST works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([JAVAC])
# Check to make sure incorrect LDADD usage is diagnosed.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# PR 77.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'lex-clean.sh'.
required='c++ lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# See also sister test 'lex-clean-cxx.sh'.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test synthesized from PR automake/6.
required='c++ lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# in obvious ways. See PR automake/6, and related semantic tests
# 'lex-depend.sh' and 'lex-depend-cxx.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test suggested by PR automake/6.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# bugs #8844 and #9933).
required='cc flex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# library, if that's available.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also test 'lex-lib-external.sh'.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# LIBOBJ machinery.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'yacc-line.sh'.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# for yacc-generated .c and .h files.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check Lex support with flex using the '%noyywrap' option.
required='cc flex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# for yacc-generated .c and .h files.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AM_MAINTAINER_MODE
# are used, even when dependency tracking is disabled.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<\END
AC_PROG_CC
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure that Automake suggest using AM_PROG_LEX when a lexer is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# From Matthew D. Langston.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for subdir lexers.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure Lex + C++ is supported.
# Please keep this is sync with sister test 'yaccpp.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Please keep this in sync with sister test 'yaccvapth.sh'.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
cat > lexoutroot.in << 'END'
LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
# and yflags2.sh.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >fake-lex <<'END'
#!/bin/sh
# Please keep this in sync with the sister tests lflags.sh, yflags.sh
# and yflags2.sh.
-. ./defs || exit 1
+. test-init.sh
cat >fake-lex <<'END'
#!/bin/sh
# PROGRAMS and LIBRARIES can be installed in (pkg)libexecdir.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
libexec_PROGRAMS = foo
# Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
required=cc
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# it's in BUILT_SOURCES. Reported by Erez Zadok.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test if a file can be mentioned in LIBOBJS and explicitly.
# (See libobj13.sh for the LTLIBRARIES check.)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# (Like libobj12.sh, but for Libtool libraries.)
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# that uses it.
# Report from Bill Davidson.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_PROG_CC
# Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Please keep this in sync with sister test 'libobj16b.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# Please keep this in sync with sister test 'libobj16a.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.proto
cat >> configure.proto << 'END'
# Make sure AC_LIBOBJ accept non-literal arguments.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test support for AC_CONFIG_LIBOBJ_DIR.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Bug from Josh MacDonald.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20b.sh' and 'libobj20c.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20a.sh' and 'libobj20c.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
# See also sister tests 'libobj20a.sh' and 'libobj20b.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_LIBOBJ_DIR([libobj-dir])
# Make sure we complain if @LIBOBJS@ is used without being set in
# configure.ac.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# Test to make sure LIBOBJS error only occurs if LIBOBJS seen. Report
# from Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
# Test to make sure AC_REPLACE_FUNCS works across lines. Report from
# Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = joe
# Test for multiple replacement functions.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for _DEPENDENCIES with libraries.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# Make sure Automake suggest using AC_PROG_RANLIB when *_LIBRARIES is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure Automake simplify conditions in diagnostics.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# Report from Guillermo Ontañón.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# Report by Charles Wilson.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_LIBTOOL
# to the test cases requiring them.
# See also automake bug#9807.
-. ./defs || exit 1
+. test-init.sh
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
# Report from Kevin Dalley.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_LIBTOOL_DLOPEN
# Report from Eric Magnien.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Also make sure we do not bloat the Makefile with unneeded rules.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure Automake suggests AC_PROG_LIBTOOL when *_LTLIBRARIES is used.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Report from Harlan Stenn.
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
# in different directories. PR/285.
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
# Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure Automake diagnoses conflicting installations.
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND1], [true])
# xxx_LDFLAGS.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure COPYING is not overwritten, even with -a -f.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
# Check that installing 'COPYING' outputs a warning.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = gnu
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See automake bug#11089.
required='cc c++'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# *_SOURCES
# Richard Boulton <richard@tartarus.org>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure the Fortran 90 linker is used when appropriate.
# (copied from 'link_f_only.sh') Mike Nolta <mrnolta@princeton.edu>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_FC
# Test to make sure the Fortran 77 linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
# Test to make sure the Fortran 77 linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure the C++ linker is used when appropriate.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test to make sure _LINK variables are detected and used as documented.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
#! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test to make sure 3rd arg to AM_INIT_AUTOMAKE not picked up in
-# version. From Joel Weber.
+# Elisp byte-compilation honours AM_ELCFLAFS and ELCFLAGS.
-. ./defs || exit 1
+. test-init.sh
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no])
-AC_CONFIG_FILES([Makefile])
+cat > Makefile.am << 'EOF'
+lisp_LISP = foo.el
+AM_ELCFLAGS = __am_elcflags__
+EOF
+
+cat >> configure.ac << 'EOF'
+AM_PATH_LISPDIR
AC_OUTPUT
-END
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
-: > Makefile.am
+./configure EMACS='echo >$@' --with-lispdir="$(pwd)/unused"
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
+: > foo.el
+ELCFLAGS='__usr_elcflags__' $MAKE -e
+grep '__am_elcflags__.*__usr_elcflags__' foo.elc
-$ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Emacs lisp files in both $(srcdir) and $(builddir) are found if
+# required by other files. Related to automake bug#11806.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LISP = requirer.el
+lisp_LISP = foo.el
+lisp_DATA = bar.el
+END
+
+echo "(require 'foo) (require 'bar)" >> requirer.el
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+$MAKE clean
+test ! -e requirer.elc
+test ! -e foo.elc
+
+# In the spirit of VPATH, stuff in the builddir is preferred to
+# stuff in the srcdir.
+echo "(provide" > ../foo.el # Break it.
+echo "defun)" > ../bar.el # Likewise.
+$MAKE && exit 1
+$sleep
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+:
# See automake bug#11806.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PATH_LISPDIR
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check compiling elisp files in different subdirectories, where a
+# file in a subdirectory might require a file in another one.
+# This doesn't work out of the box, but can be made to work with a
+# judicious use of $(AM_ELCFLAGS).
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = \
+ am-here.el \
+ sub1/am-one.el \
+ sub2/am-two.el \
+ sub3/subsub/am-three.el
+
+AM_ELCFLAGS = \
+ -L $(srcdir)/sub1 \
+ -L $(srcdir)/sub2 \
+ -L $(srcdir)/sub3/subsub
+
+elc-test:
+ test -f sub1/am-one.elc
+ test -f sub2/am-two.elc
+ test -f sub3/subsub/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir sub1 sub2 sub3 sub3/subsub
+
+cat > am-here.el << 'END'
+(provide 'am-here)
+(require 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub1/am-one.el << 'END'
+(require 'am-here)
+(provide 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub2/am-two.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(provide 'am-two)
+(require 'am-three)
+END
+
+cat > sub3/subsub/am-three.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(require 'am-two)
+(provide 'am-three)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+for x in am-here sub1/am-one sub2/am-two sub3/subsub/am-three; do
+ test -f $x.el
+ test ! -e $x.elc
+done
+
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Emacs lisp files in subdirectories.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+nobase_lisp_LISP = sub/am-one.el sub/am-two.el sub/am-three.el
+nobase_dist_lisp_LISP = sub/am-three.el
+dist_noinst_LISP = sub/am-four.el
+EXTRA_DIST = sub/am-one.el sub/am-two.el
+END
+
+mkdir sub
+echo "(require 'am-two) (provide 'am-one)" > sub/am-one.el
+echo "(require 'am-three) (provide 'am-two)" > sub/am-two.el
+echo "(provide 'am-three)" > sub/am-three.el
+echo "(require 'am-one) (require 'am-two)" > sub/am-four.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --prefix="$(pwd)/inst" \
+ --with-lispdir="$(pwd)/inst/elisp" \
+
+$MAKE
+# No byte-compiled elisp files in the top-level directory.
+test "$(echo *.elc)" = '*.elc'
+test -f sub/am-one.elc
+test -f sub/am-two.elc
+test -f sub/am-three.elc
+test -f sub/am-four.elc
+$MAKE clean
+test ! -e sub/am-one.elc
+test ! -e sub/am-two.elc
+test ! -e sub/am-three.elc
+test ! -e sub/am-four.elc
+
+# Check installation.
+
+sort > exp << 'END'
+inst/elisp/sub/am-one.elc
+inst/elisp/sub/am-two.elc
+inst/elisp/sub/am-three.elc
+END
+
+$MAKE install
+find inst # For debugging.
+find inst -name '*.elc' > lst || { cat lst; exit 1; }
+sort lst > got
+
+cat exp
+cat got
+diff exp got
+
+# Also check VPATH builds and uninstall completeness.
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Compiling elisp files in different subdirectories.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = am-one.el
+nodist_lisp_LISP = sub/am-two.el
+sub/am-two.el:
+ mkdir sub
+ echo "(provide 'am-two)" > $@
+DISTCLEANFILES = $(nodist_lisp_LISP)
+dist_noinst_LISP = x/y/z/am-three.el
+
+elc-test:
+ test -f am-one.elc
+ test -f sub/am-two.elc
+ test -f x/y/z/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir x x/y x/y/z
+echo "(provide 'am-one)" > am-one.el
+# sub/am-two.el is generated at make runtime
+echo "(provide 'am-three)" > x/y/z/am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+test -f am-one.el
+test -f sub/am-two.el
+test -f x/y/z/am-three.el
+
+# Byte-compiling only a subset of the elisp files.
+$MAKE am-one.elc sub/am-two.elc
+test -f am-one.elc
+test -f sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+rm -f am-one.elc sub/am-two.elc
+$MAKE x/y/z/am-three.elc
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test -f x/y/z/am-three.elc
+
+$MAKE distcheck
+
+:
# Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
-. ./defs || exit 1
+. test-init.sh
: TRY 1 -- We lack both EMACS and lispdir.
# Test that compiling interdependent elisp files works.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
# Make sure we can recover from a deletion.
rm -f am-one.elc
$MAKE uninstall
find _inst | $EGREP '\.elc?$' && exit 1
-# Make sure we build all files when any of them change.
-# (We grep a message to make sure the compilation happens.)
-unique=0a3346e2af8a689b85002b53df09142a
-$sleep
-echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; exit 1; }
-cat output
-grep $unique output
-
# It should also work for VPATH-builds.
$MAKE distcheck
# Report from Simon Josefsson.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
lisp_LISP = am-one.el am-two.el am-three.el
test ! -f am-one.elc
test ! -f am-two.elc
test ! -f am-three.elc
- test ! -f elc-stamp
install-test: install
test -f "$(lispdir)/am-one.el"
# non-bytecompiled *.el files.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
lisp_DATA = am-one.el am-two.el am-three.el
test ! -f am-one.elc
test ! -f am-two.elc
test ! -f am-three.elc
- test ! -f elc-stamp
install-test: install
test -f "$(lispdir)/am-one.el"
# Test for conditional _LISP.
required=emacs
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el
test -f am-one.elc
test ! -e am-two.elc
test -f am-three.elc
-test -f elc-stamp
$MAKE install
test -f lisp/am-one.el
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
./configure --with-lispdir="$cwd/lisp" want_two=1
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
# Let's mutilate the source tree, to check the recover rule.
rm -f am-*.elc
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
$MAKE install
test -f lisp/am-one.el
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
:
# Make sure that lisp_LISP also works when emacs is not installed.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test -f elc-stamp
$MAKE distcheck
# Check the recover rule of lisp_LISP with parallel make.
required='GNUmake emacs'
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
rm -f am-*.elc
$MAKE -j >>stdout || { cat stdout; exit 1; }
cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
:
# Check that 'make -n' works with the lisp_LISP recover rule.
required='emacs non-root'
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
dist_lisp_LISP = am-one.el am-two.el am-three.el
test -f am-one.elc
test -f am-two.elc
test -f am-three.elc
-test -f elc-stamp
-rm -f am-*.elc elc-stamp
+rm -f am-*.elc
chmod a-w .
test ! -e am-one.elc
test ! -e am-two.elc
test ! -e am-three.elc
-test ! -e elc-stamp
:
t/lex-subobj-nodep.sh \
t/remake-am-pr10111.sh \
t/remake-m4-pr10111.sh \
-t/tags-pr12372.sh \
t/txinfo5.sh \
$(perl_fake_XFAIL_TESTS)
t/acloca12.sh \
t/acloca13.sh \
t/acloca14.sh \
+t/acloca14b.sh \
t/acloca15.sh \
t/acloca16.sh \
t/acloca17.sh \
t/acloca20.sh \
t/acloca21.sh \
t/acloca22.sh \
+t/acloca22b.sh \
t/acloca23.sh \
t/aclocal-acdir.sh \
t/aclocal-install-absdir.sh \
+t/aclocal-macrodir.tap \
+t/aclocal-amflags.sh \
t/aclocal-print-acdir.sh \
t/aclocal-path.sh \
t/aclocal-path-install.sh \
t/aclocal-install-mkdir.sh \
t/aclocal-no-install-no-mkdir.sh \
t/aclocal-verbose-install.sh \
+t/aclocal-autoconf-version-check.sh \
t/ac-output-old.tap \
t/acsilent.sh \
t/acsubst.sh \
t/autodist-no-duplicate.sh \
t/autodist-stamp-vti.sh \
t/autohdr.sh \
-t/autohdr2.sh \
t/autohdr3.sh \
t/autohdr4.sh \
t/autohdr-subdir-pr12495.sh \
t/backcompat.sh \
t/backcompat2.sh \
t/backcompat3.sh \
-t/backcompat4.sh \
-t/backcompat5.sh \
t/backcompat6.sh \
+t/backcompat-acout.sh \
t/backsl.sh \
t/backsl2.sh \
t/backsl3.sh \
t/check-concurrency-bug9245.sh \
t/checkall.sh \
t/clean.sh \
-t/clean2.sh \
t/colneq.sh \
t/colneq2.sh \
t/colneq3.sh \
t/colon5.sh \
t/colon6.sh \
t/colon7.sh \
-t/color.sh \
-t/color2.sh \
+t/color-tests.sh \
+t/color-tests2.sh \
+t/color-tests-opt.sh \
t/comment.sh \
t/comment2.sh \
t/comment3.sh \
t/cxxlibobj.sh \
t/cxxlink.sh \
t/cxxnoc.sh \
-t/cygnus-deprecation.sh \
-t/cygnus-check-without-all.sh \
-t/cygnus-dependency-tracking.sh \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
+t/cygnus-no-more.sh \
t/cygwin32.sh \
t/dash.sh \
t/defun.sh \
t/help-dmalloc.sh \
t/help-init.sh \
t/help-lispdir.sh \
-t/help-multilib.sh \
t/help-python.sh \
t/help-silent.sh \
t/help-upc.sh \
t/lisp6.sh \
t/lisp7.sh \
t/lisp8.sh \
+t/lisp-loadpath.sh \
+t/lisp-subdir.sh \
+t/lisp-subdir2.sh \
+t/lisp-subdir-mix.sh \
t/lispdry.sh \
t/lisp-pr11806.sh \
+t/lisp-flags.sh \
t/listval.sh \
t/location.sh \
t/longline.sh \
t/man.sh \
t/man2.sh \
t/man3.sh \
-t/man4.sh \
t/man5.sh \
t/man6.sh \
t/man7.sh \
t/mdate4.sh \
t/mdate5.sh \
t/mdate6.sh \
-t/missing.sh \
-t/missing2.sh \
+t/missing-version-mismatch.sh \
t/missing3.sh \
-t/missing4.sh \
-t/missing5.sh \
-t/missing6.sh \
t/am-missing-prog.sh \
t/missing-auxfile-stops-makefiles-creation.sh \
t/mkdir_p.sh \
t/mkinst3.sh \
t/mmode.sh \
t/mmodely.sh \
-t/multlib.sh \
t/no-extra-makefile-code.sh \
t/no-spurious-install-recursive.sh \
t/nobase.sh \
t/objcxx-deps.sh \
t/objc-megademo.sh \
t/objext-pr10128.sh \
-t/obsolete.sh \
t/oldvars.sh \
t/order.sh \
t/output.sh \
t/parallel-am2.sh \
t/parallel-am3.sh \
t/serial-tests.sh \
-t/parallel-tests2.sh \
t/parallel-tests-basics.sh \
t/parallel-tests-concurrency.sh \
t/parallel-tests-concurrency-2.sh \
t/python-vars.sh \
t/python-virtualenv.sh \
t/python-pr10995.sh \
-t/recurs.sh \
-t/recurs2.sh \
+t/recurs-user.sh \
+t/recurs-user2.sh \
+t/recurs-user-deeply-nested.sh \
+t/recurs-user-indir.sh \
+t/recurs-user-keep-going.sh \
+t/recurs-user-many.sh \
+t/recurs-user-no-subdirs.sh \
+t/recurs-user-no-top-level.sh \
+t/recurs-user-override.sh \
+t/recurs-user-phony.sh \
+t/recurs-user-wrap.sh \
t/relativize.tap \
t/remake-fail.sh \
t/remake-not-after-make-dist.sh \
t/remake-mild-stress.sh \
t/remake-all-1.sh \
t/remake-all-2.sh \
+t/remake-recurs-user.sh \
t/remake-subdir.sh \
t/remake-subdir2.sh \
t/remake-subdir3.sh \
t/remake-deleted-am-subdir.sh \
t/remake-deleted-am.sh \
t/remake-renamed-am.sh \
+t/remake-aclocal-version-mismatch.sh \
+t/remake-macrodir.sh \
t/remake-timing-bug-pr8365.sh \
t/req.sh \
t/reqd.sh \
t/silent7.sh \
t/silent8.sh \
t/silent9.sh \
-t/silent-obsolescent-warns.sh \
t/silentcxx.sh \
t/silentcxx-gcc.sh \
t/silentf77.sh \
t/silentf90.sh \
-t/silent-amopts.sh \
t/silent-many-gcc.sh \
t/silent-many-generic.sh \
-t/silent-nowarn.sh \
t/silent-configsite.sh \
t/silent-nested-vars.sh \
t/silent-lex.sh \
t/txinfo2.sh \
t/txinfo3.sh \
t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
t/txinfo6.sh \
t/txinfo7.sh \
t/txinfo8.sh \
t/txinfo27.sh \
t/txinfo28.sh \
t/txinfo29.sh \
-t/txinfo30.sh \
t/txinfo31.sh \
t/txinfo32.sh \
t/txinfo33.sh \
t/vala-parallel.sh \
t/vars.sh \
t/vars3.sh \
+t/var-recurs.sh \
+t/var-recurs2.sh \
t/vartar.sh \
t/vartypos.sh \
t/vartypo2.sh \
-t/version.sh \
-t/version2.sh \
t/version3.sh \
t/version4.sh \
t/version6.sh \
# From Adam J. Richter.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([LTLIBOBJS])
# Test for locations in error messages.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Long lines should be wrapped.
# Report from Albert Chin.
-. ./defs || exit 1
+. test-init.sh
n=1 files= match=
while test $n -le 100
# Long lines of += should be wrapped.
# Report from Simon Josefsson.
-. ./defs || exit 1
+. test-init.sh
(echo DUMMY = some_long_filename_1;
for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
# This combines two examples from the manual.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([WANT_LIBFOO], [true])
# Test for bug in conditionals.
required='cc native libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# This example is taken from the manual.
required='cc native libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Test to make sure libtool library dependencies are correct.
# Report from Lars J. Aas.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# present since libtool 1.9b, circa 2004).
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Test to make sure LTLIBOBJS alone works ok.
# Report from Vadim Zeitlin.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([LTLIBOBJS])
# Test to make sure a sensible default source for libraries is used.
required='cc libtool'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for correct installation order of nobase libtool libraries.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Check support for no-dist-gzip with lzma.
-. ./defs || exit 1
+. test-init.sh
errmsg='support for lzma.*removed'
# Test to see if 'm4_sinclude' and 'm4_include' works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
sinclude([doesntexist.m4])
# This test is for VPATH builds; see sister test 'maintclean.sh'
# for in-tree builds.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar sub/Makefile])
# This test is for in-tree builds; see sister test 'maintclean-vpath.sh'
# for VPATH builds.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([bar sub/Makefile])
# related to the enabling/disabling of maintainer mode are correct (see
# automake bug#9890).
-. ./defs || exit 1
+. test-init.sh
set_maintmode ()
{
# Check that $(am__make_dryrun) works as expected.
-. ./defs || exit 1
+. test-init.sh
plan_ 14
# From Ralf Corsepius.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_MAKE_INCLUDE
# Make sure we don't emit a rule with empty target if list of
# automatically-computed dependencies for Makefile.in is empty.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# via autom4te.
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
m4_include([version.m4])
# without -B, it may reuse the same shell for separate commands in a
# rule, which can lead to interesting results.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# Also, ensure that 'make -n dist' and 'make -n distcheck' show what
# would happen, at least when using GNU make.
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# special target, the output from make is sufficiently complete.
#
# This test exercises the GCS-mandated targets (except for dist)
-# as well as tags, TAGS.
+# as well as tags.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
# Does $MAKE support the '.MAKE' special target?
have_dotmake=false
@: > stamp-installcheck-sub
tags:
@: > stamp-tags-sub
-TAGS:
- @: > stamp-TAGS-sub
mostlyclean-local:
@: > stamp-mostlyclean-sub
maintainer-clean-local:
@: > sub2-$@-should-not-be-executed
install-info install-html install-dvi install-pdf install-ps:
@: > sub2-$@-should-not-be-executed
-installcheck installdirs tags TAGS mostlyclean:
+installcheck installdirs tags mostlyclean:
@: > sub2-$@-should-not-be-executed
## These targets cannot be overridden like this:
## install-strip distclean maintainer-clean
all install install-strip uninstall clean distclean check \
info html dvi pdf ps \
install-info install-html install-dvi install-pdf install-ps \
- installcheck installdirs tags TAGS mostlyclean maintainer-clean
+ installcheck installdirs tags mostlyclean maintainer-clean
do
$MAKE -n $target >stdout || { cat stdout; exit 1; }
cat stdout
case $target in
- install-* | installdirs | tags | TAGS ) ;;
+ install-* | installdirs | tags ) ;;
*)
if $have_dotmake; then
grep "stamp-$target$" stdout || exit 1
# Test to make sure that automake includes the needed variables,
# but not too many.
-. ./defs || exit 1
+. test-init.sh
# Find the macros wanted by Automake.
$ACLOCAL
# Test to make sure 'dist' prefix works with man pages.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
dist_man_MANS = foo.1
# Make sure that man pages listed in man_MANS are installed and
# renamed as documented.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# PR 516: Prefer generated manpages to distributed ones.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
dist_man_MANS = foo.1
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2008-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Ensure 'make dist' fails when help2man replacement man pages are created.
-#
-# The assumption here is the following: if the developer uses help2man to
-# generate man pages from --help output, then these man pages may not be
-# stored in VCS. However, they should be distributed, so that the end user
-# that receives the tarball doesn't have to install help2man. If they are
-# not distributed, then the developer should make help2man a prerequisite
-# to building the package from a tarball, e.g., with a configure check for
-# help2man that errors out if it is unavailable. In both cases it is
-# sufficient to check only distributed man pages.
-#
-# Idea of this whole shenanigan is to allow somebody to check out sources from
-# a VCS and build and install them without needing help2man installed. The
-# installed man pages will be bogus in this case. Typically, this happens
-# when developers ask users to try out a fix from VCS; the developers themselves
-# will usually have help2man installed (or should install it).
-
-. ./defs || exit 1
-
-cat > Makefile.am << 'END'
-dist_man_MANS = $(srcdir)/foo.1 bar.1
-dist_bin_SCRIPTS = foo bar
-$(srcdir)/foo.1:
- $(HELP2MAN) --output=$@ $(srcdir)/foo
-bar.1:
- $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
-END
-
-cat >>configure.ac <<'END'
-AM_MISSING_PROG([HELP2MAN], [help2man])
-AC_OUTPUT
-END
-
-cat > foo <<'END'
-#! /bin/sh
-while test $# -gt 0; do
- case $1 in
- -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
- -v | --version) echo "$0 1.0"; exit 0;;
- esac
- shift
-done
-END
-cp foo bar
-chmod +x foo bar
-
-mkdir bin
-cat > bin/help2man <<'END'
-#! /bin/sh
-# Fake help2man script that lets 'missing' think it is not installed.
-exit 127
-END
-chmod +x bin/help2man
-PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
-
-grep_error_messages()
-{
- grep ' man pages contain.*missing help2man.* replacement text' stderr \
- && grep 'install help2man' stderr \
- && grep 'regenerate the man pages' stderr \
- || exit 1
-}
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distclean
-
-mkdir build
-cd build
-../configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep_error_messages
-
-:
# Make sure to extract the correct mansection from files in man_MANS.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# even if the 'missing' script is involved.
required=help2man
-. ./defs || exit 1
+. test-init.sh
# Avoid a spurious failure due to a known FreeBSD make incompatibility.
useless_vpath_rebuild \
../configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar ../foobar.1
./configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar foobar.1
# Check for a bug in maintainer-clean w.r.t. generated manpages.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
dist_man_MANS = $(srcdir)/foo.1 bar.1
# Check for a bug in distcheck w.r.t. generated manpages.
-. ./defs || exit 1
+. test-init.sh
# Avoid a spurious failure due to a known FreeBSD make incompatibility.
useless_vpath_rebuild \
# Test that mdate-sh is required when Texinfo used and version.texi needed.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# Test to make sure mdate-sh is included in distribution.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# Test to make sure mdate-sh run correctly.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Test to make sure that mdate-sh is added to the right directory.
# Report from Kevin Dalley.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# Test to make sure mdate-sh works correctly.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
get_shell_script mdate-sh
# mdate-sh can work with weird file names, doesn't eval too much.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
a=
file='file name $a'
# Automake should stop the creation of Makefile.in files at the first
# encountered error due to a required auxiliary file not found.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AM_PATH_PYTHON
# Test missing with version mismatches.
-. ./defs || exit 1
+am_create_testdir=empty
+. test-init.sh
-cat >>configure.ac <<'EOF'
-m4_include([v.m4])
-AC_OUTPUT
-EOF
+get_shell_script missing
-: > v.m4
+do_check ()
+{
+ progname=$1; shift;
+ ./missing "$@" 2>stderr && { cat stderr >&2; exit 1; }
+ cat stderr >&2
+ $FGREP "WARNING: '$progname' is probably too old." stderr
+}
-: > Makefile.am
+echo 'AC_INIT([x], [1.0]) AC_PREREQ([9999])' >> configure.ac
-get_shell_script missing
+do_check autoconf $AUTOCONF
+do_check autoheader $AUTOHEADER
+do_check aclocal-$APIVERSION $am_original_ACLOCAL
+
+cat > configure.ac << 'END'
+AC_INIT([x], [0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+echo AUTOMAKE_OPTIONS = 9999.9999 > Makefile.am
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# See the test 'missing.sh' for explanations about this.
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' > v.m4
-$MAKE distdir
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
-$sleep
-touch v.m4
-$MAKE && exit 1
+: > install-sh
+# FIXME: this doesn't work due to a bug in automake (not 'missing').
+#do_check automake-$APIVERSION $am_original_AUTOMAKE
:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2003-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test missing with version mismatches.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<'EOF'
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-get_shell_script missing
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Make sure we do use missing, even if the user exported AUTOCONF.
-# (We cannot export this new value, because it would be used by Automake
-# when tracing, and missing is no good for this.)
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' >> aclocal.m4
-$MAKE distdir
-
-# Try version number suffixes if we can add them safely.
-case $MYAUTOCONF in *autoconf)
- ./configure AUTOCONF="${MYAUTOCONF}6789"
- $MAKE
- $sleep
- # Hopefully the install version of Autoconf cannot compete with this one...
- echo 'AC_PREREQ(9999)' >> aclocal.m4
- $MAKE distdir
-esac
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fails when timestamps aren't updated and missing is not used.
-$sleep
-touch aclocal.m4
-$MAKE && exit 1
-
-:
# Test missing when running a tool's --version.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
get_shell_script missing
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ()
+{
+ st=0; "$@" >stdout 2>stderr || st=$?
+ cat stdout
+ cat stderr >&2
+ return $st
+}
-./missing --run b7cb8259 --version && exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ./missing b7cb8259 --version && exit 1
+grep WARNING stderr && exit 1
+run_cmd ./missing b7cb8259 --grep && exit 1
+
+if test x"$am_test_prefer_config_shell" != x"yes"; then
+ # The /bin/sh from Solaris 10 is a spectacular failure. After a failure
+ # due to a "command not found", it sets '$?' to '1'.
+ if (st=0; /bin/sh -c 'no--such--command' || st=$?; test $st -eq 127); then
+ grep 'WARNING:.*missing on your system' stderr
+ fi
+fi
# missing itself it known to exist :)
-./missing ./missing --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
+run_cmd ./missing ./missing --version || exit 1
+grep 'missing .*(GNU [aA]utomake)' stdout
+test -s stderr && exit 1
+run_cmd ./missing ./missing --grep && exit 1
grep WARNING stderr && exit 1
-grep Unknown stderr
+grep "missing:.* unknown '--grep'" stderr
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2006-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test how well 'missing' finds output file names of various tools.
-# PR automake/483.
-
-am_create_testdir=empty
-. ./defs || exit 1
-
-get_shell_script missing
-
-# These programs may be invoked by 'missing'.
-needed_tools='chmod find sed test touch'
-needed_tools_csep=$(echo $needed_tools | sed 's/ /, /g')
-
-cat >configure.ac <<EOF
-AC_INIT([missing4], [1.0])
-m4_foreach([tool], [$needed_tools_csep],
- [AC_PATH_PROG(tool, tool, [false])
- AC_CONFIG_FILES(tool, chmod +x tool)
- ])
-AC_OUTPUT
-EOF
-
-for tool in $needed_tools; do
- unindent >$tool.in <<EOF
- #! /bin/sh
- exec @$tool@ "\$@"
-EOF
-done
-
-$AUTOCONF
-./configure
-
-echo output-file > output-file
-cp output-file my--output--file-o
-
-save_PATH=$PATH
-PATH=.
-export PATH
-missing --help
-missing --version
-for tool in autom4te help2man makeinfo; do
- missing --run $tool -o my--output--file-o input
- missing --run $tool --output my--output--file-o input
-done
-PATH=$save_PATH
-export PATH
-diff output-file my--output--file-o
-test ! -e ./--file-o
-test ! -e input
# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
# compatibility.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the AM_PROG_MKDIR_P macro is deprecated; it will be
-# be removed in the next major Automake release. But also check
-# that it still works as expected in the current release series.
+# Check that the AM_PROG_MKDIR_P macro is deprecated. It will be
+# be removed in the next major Automake release.
-. ./defs || exit 1
+. test-init.sh
-cat >> configure.ac << 'END'
-AM_PROG_MKDIR_P
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-all-local:
- $(mkdir_p) . dir1/a
- @mkdir_p@ . dir2/b
-check-local: all
- test -d dir1/a
- test -d dir2/b
- test -d dir3/c
- test -d dir3/d
-END
-
-mkdir sub
-cat > sub/Makefile.am << 'END'
-# '$(mkdir_p)' should continue to work even in subdir makefiles.
-all-local:
- $(mkdir_p) .. ../dir3/c
- @mkdir_p@ .. ../dir3/d
-END
+echo AM_PROG_MKDIR_P >> configure.ac
+: > Makefile.am
grep_err ()
{
$AUTOCONF -Werror -Wno-obsolete
-AUTOMAKE_fails
-grep_err
+#AUTOMAKE_fails
+#grep_err
AUTOMAKE_fails --verbose -Wnone -Wobsolete
grep_err
$AUTOMAKE -Wno-obsolete
-./configure
-$MAKE check-local
-$MAKE distcheck
-
:
# Test to make sure no-installman suppresses man dir creation.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test mkinstalldirs with spaces in directory names.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cwd=$(pwd) || fatal_ "getting current working directory"
# Test for bug where mkinstalldirs variable can be set incorrectly.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
pkgdata_DATA =
# Check for AM_MAINTAINER_MODE defaults.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# From Derek R. Price.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
# by a regression caused by removal of automatic de-ANSI-fication support:
# <http://lists.gnu.org/archive/html/automake-patches/2011-08/msg00200.html>
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Regression test for install-recursive appearing in a non recursive Makefile.
# Report from Bruno Haible.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
noinst_SCRIPTS = hostname
# greater exposure of that test.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Interaction of 'nobase_' and 'nodist_' prefixes.
-. ./defs || exit 1
+. test-init.sh
# Simulate no emacs and no python (it shouldn't be needed in this test).
EMACS="no" PYTHON=":"; export EMCAS PYTHON
# Make sure nobase_* works for python files.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AM_PATH_PYTHON
# Make sure nobase_* works.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
-. ./defs || exit 1
+. test-init.sh
# -------------------------------------------------------------------
# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
# forms. The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms
# are dropped, just erase the file.
-# nodef2.sh contains the modern version of this test.
+# nodef2.test contains the modern version of this test.
# -------------------------------------------------------------------
# First, check that PACKAGE and VERSION are output by default.
# Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
-. ./defs || exit 1
+. test-init.sh
# First, check that PACKAGE and VERSION are output by default.
# Test to make sure no-dependencies option does the right thing.
# Bug report from Greg A. Woods.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dependencies
# Another test to make sure no-dependencies option does the right thing.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
AC_PROG_CC
AC_PROG_CXX
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_AS
AM_PROG_GCJ
AM_PROG_UPC
# Test to make sure depcomp isn't always required.
-. ./defs || exit 1
+. test-init.sh
rm -f depcomp
# Test to make sure dist_*_SOURCES and nodist_*_SOURCES work.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure nodist_noinst_HEADERS work.
# For PR 249.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_OUTPUT
# Test to make sure no-dist option works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check to make sure "make install" will build all in directory with
# nothing to install.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
all-local:
# From Pavel Roskin.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo.sh
# Make sure Automake does not emit a link rule for unknown languages.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-exeext
# just skip the rest of the test if configure fails to find a working C
# compiler.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check all notrans_, dist_, nodist_ prefix combinations for MANS
# primary and install-man dependencies.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# Test to make sure _OBJECTS is only generated once. Bug reported by
# Joerg-Martin Schwarz.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# require an Objective-C compiler.
# See also sister test 'objcxx-basic.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
bin_PROGRAMS = hello
# Automatic dependency tracking for Objective C.
# See also sister test 'objcxx-deps.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_OBJC
# Test Objective C compilation flags.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_OBJC
grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
./configure OBJCFLAGS=-UERROR
-$MAKE
+$MAKE
:
required=libtoolize
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
## Autotools Input Files.
cat > configure.ac << 'END'
AC_INIT([play], [1.3], [bug-automake@gnu.org])
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([play.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
## Run Autotools.
libtoolize
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOHEADER
$AUTOCONF
$AUTOMAKE --add-missing
# See also sister test 'objcxx-minidemo.sh'.
required=native
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_OBJC
# require an Objective-C++ compiler.
# See also sister test 'objc-basic.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
bin_PROGRAMS = hello
rm -rf autom4te*.cache
cat >> configure.ac <<'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOMAKE
$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
# Automatic dependency tracking for Objective C++.
# See also sister test 'objc-deps.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
# Test Objective C++ compilation flags.
# See also sister test 'objc-flags.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
END
done
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
./configure OBJCXXFLAGS=-UERROR
-$MAKE
+$MAKE
:
# See also sister test 'objc-minidemo.sh'.
required=native
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOHEADER
$AUTOMAKE --add-missing
# Test for automake bug#10128: $(OBJEXT) redefinition causes
# $(foo_OBJECTS) to be defined as empty.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 1996-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure obsolete macros can be autoupdated.
-
-# We need the following indirection in case someone exported e.g.
-# AUTOUPDATE='autoupdate --verbose'.
-set x ${AUTOUPDATE-autoupdate}
-required=$2
-. ./defs || exit 1
-
-cat > configure.ac << 'END'
-AC_INIT
-END
-
-$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$am_automake_acdir/obsolete.m4" > obs
-cat obs >> configure.ac
-$PERL -ne 'chomp; print "grep $_ output || exit 1\n"; ' obs > obs.1
-$PERL -ne 'chomp; print "grep $_ configure.ac && exit 1\n"; ' obs > obs.2
-echo : >> obs.1 # Since it will be sourced, it must end with a success.
-echo : >> obs.2 # Likewise.
-
-cat configure.ac # For debugging.
-cat obs.1 # Likewise.
-cat obs.2 # Likewise.
-
-# Sanity check. Make sure we have added something to configure.ac.
-test $(wc -l <configure.ac) -gt 1
-
-$ACLOCAL
-
-# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >output 2>&1 || { cat output; exit 1; }
-cat output
-. ./obs.1
-# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE
-. ./obs.2
-
-# Autoconf should be able to grok the updated configure.ac.
-$AUTOCONF
-
-:
# Use of these variables is deprecated:
# LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<\EOF
DATA =
# Make sure AC_DEFUN is handled correctly. This test isn't named very
# well. Report from Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
jm_TEST
# Test that 'automake -a' output order is stable.
# From report by Bruno Haible.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# Test to make sure files listed in AC_OUTPUT are found.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# This is comparable to 'output9.sh', but testing Makefile rules.
# PR/411
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << END
AC_SUBST([FOO], [top])
# Make sure an AC_CONFIG_FILES ignore filenames with shell variables.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
# Make sure an AC_CONFIG_FILES process filenames with AC_SUBST variables.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
# Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
# are not prerequisites of 'all'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << \END
AC_SUBST([FOO], [foo])
# Another AC_OUTPUT test. From report by Ulrich Drepper.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Yet another AC_OUTPUT test.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# It's hard to believe there are so many AC_OUTPUT-related bugs.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Make sure Automake complains when there is no Makefile specified.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([foo], [bar], [baz])
# Check for support for colon-separated input files in AC_CONFIG_FILES.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Check for support for colon separated input files in AC_CONFIG_FILES,
# with sources in sub directories.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Check AC_CONFIG_FILES support for files starting with '../'.
# Report from Bruno Haible.
-. ./defs || exit 1
+. test-init.sh
mkdir testdir
cd testdir
# Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << END
AC_CONFIG_FILES([a/mid.in:a/input.in.in])
# Test for conditionally-defined overrides.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
# This test is still xfailing; see the FIXME in Automake::Rule::define.
# Once that is fixed, the test should succeed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [:])
# Test that overriding 'html' target causes only one "html:" rule to
# be output.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
html:
# Make sure automake -Woverride suggests using TARGET-local instead
# of TARGET when possible.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
install:
# This test checks (0), (1), and (2). See sister tests for further coverage.
required=perl-threads
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([parallel-am], [1.0])
# warnings should be omitted in the same way as without threads.
required=perl-threads
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# installation of aux files should be race-free.
required=perl-threads
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([parallel-am], [1.0])
# - TEST_LOGS redefinition at runtime
# - RECHECK_LOGS redefinition at runtime
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that we can use indirections when overriding TESTS and
# TEST_LOGS from the command line.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# It merely serves as demonstration. :-)
required='cc native GNUmake'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check parallel-tests features:
# - concurrent parallel execution
-. ./defs || exit 1
+. test-init.sh
case $MAKE in
*\ -j*) skip_ "\$MAKE contains '-j'";;
# parallel-tests: some checks on console output about testsuite
# progress.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' gets automatically installed
-# in the correct directory by 'parallel-tests' option.
+# in the correct directory.
-. ./defs || exit 1
-
-: Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
-
-mkdir am-init-automake
-cd am-init-automake
+am_create_testdir=empty
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([my_aux_dir])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile sub/Makefile])
AC_OUTPUT
END
test ! -e test-driver
test ! -e sub/test-driver
-grep '^configure\.ac:3:.*installing.*my_aux_dir/test-driver' stderr
-
-cd ..
-
-: Now try with parallel-tests defined in AUTOMAKE_OPTIONS.
-
-mkdir automake-options
-cd automake-options
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([dir/GNUmakefile])
-AC_OUTPUT
-END
-
-mkdir build-aux dir
-
-cat > dir/GNUmakefile.am <<END
-TESTS = foo.test
-AUTOMAKE_OPTIONS = parallel-tests
-TESTS += bar.test
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
- || { cat stderr >&2; exit 1; }
-cat stderr >&2
-
-ls -l . dir build-aux # For debugging.
-test -f build-aux/test-driver
-test ! -e test-driver
-test ! -e dir/test-driver
-
-grep '^dir/GNUmakefile\.am:2:.*installing.*build-aux/test-driver' stderr
+grep '^parallel-tests:.*installing.*my_aux_dir/test-driver' stderr
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-2.sh'.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-1.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - empty TESTS
# - empty TEST_LOGS
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
# See 'parallel-tests-trailing-whitespace.sh' for a similar issue.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
END
# parallel-tests:
# - check2.am and interaction with $(EXEEXT)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
dnl We need to fool the init.m4 internals a little.
# Check parallel-tests features: normal and special exit statuses
# in the test scripts.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# (or even be) $(EXTRA_PROGRAMS).
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# sister test 'parallel-tests-fd-redirect.sh'.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# check for tests that are binary executables.
# See also the more generic test 'check-fd-redirect.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - If $(TEST_SUITE_LOG) is in $(TEST_LOGS), we get a diagnosed
# error, not a make hang or a system freeze.
-. ./defs || exit 1
+. test-init.sh
# We don't want localized error messages from make, since we'll have
# to grep them. See automake bug#11452.
# manual for the ugliness in this area, when VPATH comes into
# play. :-/
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check parallel-tests features: DISABLE_HARD_ERRORS
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver removed incomplete log files
+# Check that the parallel testsuite harness removes incomplete log files
# when interrupt upon some signal. This test is definitely too hacky,
# but we couldn't find a better way to deal with inter-processes
# signals and the whole process-synchronization mess.
-. ./defs || exit 1
+. test-init.sh
plan_ 16
# and xxx_LOG_FLAGS), also with AC_SUBST'd stuff.
# See also related test 'parallel-tests-log-compiler-2.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([acsubst_compiler], [t-compiler])
# See also related test 'parallel-tests-log-compiler-1.sh'.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# LOG_COMPILER and LOG_FLAGS given in the manual.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_SUBST([PERL], ['$PERL'])
# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# - $(TEST_SUITE_LOG) and $(TESTS)
# - $(TEST_SUITE_LOG) and $(TEST_LOGS)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
# for the recheck target.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Colorized output from the testsuite report shouldn't end up in log files.
required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
TERM=ansi; export TERM
cat >Makefile.am <<'END'
LOG_COMPILER = $(SHELL)
-AUTOMAKE_OPTIONS = color-tests parallel-tests
+AUTOMAKE_OPTIONS = color-tests
TESTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
END
# Check that ':test-results:' directives in test scripts' output doesn't
# originate spurious results in the testsuite summary.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# clean directory. An early implementation of the '.trs' intermediate
# files incurred a similar problem.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# See automake bug#11252.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# failures for the test cases. See automake bug#11791.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check parallel-tests features:
# - recheck
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver correctly handle overrides of the
+# Check that the testsuite harness correctly handle overrides of the
# TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
TERM=ansi; export TERM
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver creates parent directories for
+# Check that the parallel test harness creates parent directories for
# the log files when needed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# See also sister test 'parallel-tests-suffix.sh'.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# - suffix rules
# See also sister test 'parallel-tests-suffix-prog.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - trailing whitespace in TESTS
# GNU make 3.80 may expand trailing white space to '.log'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that the testsuite driver copes well with unreadable '.log'
# and '.trs' files.
-. ./defs || exit 1
+. test-init.sh
: > t
chmod a-r t && test ! -r t || skip_ "you can still read unreadable files"
# Test to make sure backslash-newline is treated as whitespace.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that -Wportability understands %-style pattern
# rules.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# '${ARCH}/%.$(OBJEXT):'.
# Report from Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
cat >>Makefile.am << 'EOF'
${ARCH}/%.$(OBJEXT): %.S
# Check that many conditions do not lead to combinatorial explosion.
# (This is related to PR/352.)
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >>configure.ac
# FIXME: performance is too low, and FAIL accordingly; it just offers an
# FIXME: easy way to verify how effective a performance optimization is.
-. ./defs || exit 1
+. test-init.sh
count=5000
# FIXME: performance is too low, and FAIL accordingly; it just offers
# FIXME: an easy way verify how effective a performance optimization is.
-. ./defs || exit 1
+. test-init.sh
count=10000
echo :test-result: PASS >> $i.trs
echo :copy-in-global-log: yes >> $i.trs
echo TESTS += $i.t
-done >> Makefile.am
+done >> Makefile.am
# Re-enable shell traces.
set -x
# Make sure .PHONY can be given dependencies several times.
# From Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am << 'EOF'
.PHONY: foo
# Test '+=' functionality.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
data_DATA = zar
# Test for += and backslashes.
# Reported by Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'END'
AM_CONDITIONAL([A], [true])
# is erroneously retained in the final value.
# See also sister test 'pluseq11b.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_OUTPUT
# Test '+=' with conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# Another '+=' test with conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# Yet another '+=' test.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for another '+=' problem. Report from Brian Jones.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([CHECK], [true])
# Test that '+=' works with standard header-vars.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([ZZZ])
# Test that '+=' fails when required.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Another '+=' test. From Paul Berrevoets.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
VAR = \
# Test the += diagnostics.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'END'
AM_CONDITIONAL([COND1], [true])
# Test that POSIX variable expansion '$(var:str=rpl)' works
# in when used with the DATA primary.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test that POSIX variable expansion '$(var:str=rpl)' works when used
# in EXTRA_DIST.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# when used in LDADD.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'posixsubst-ltlibraries.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep this in sync with sister test 'posixsubst-libraries.sh'.
required='cc libtool libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# with the PROGRAMS primary.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test that POSIX variable expansion '$(var:str=rpl)' works when used
# with the SCRIPTS primary.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# with the SOURCES primary.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# with the TESTS special variable.
# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# and renamed.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
AC_INIT([$me], [1.0])
# Test to make sure preprocessed F77 works.
# Report from Jochen Kuepper.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_F77
# to the distribution directory before it creates a templ
# subdirectory in the distribution directory.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT([README.foo:templ/README.foo.in])
# rename one of the 'foo.o' files.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# to debug the problem.
# Note that this should be also in the documentation.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
if NEVER_TRUE
# should be '$(top_builddir)/bar/.deps'.
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir foo
# Make sure AC_CYGWIN requires config.{sub,guess}.
# Reported by James Youngman.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<EOF
AC_CYGWIN
# the colon in the CONFIG_FILES variable.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Dependency tracking -vs- nonstandard Makefile names
required=cc
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# fail with messages like:
# foo_DEPENDENCIES was already defined in condition TRUE, ...
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# fail with messages like:
# foo_DEPENDENCIES was already defined in condition TRUE, ...
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test for PR 287: empty SUBDIRS.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# PR/300
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_RANLIB
# PR/300
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# PR/300
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# compilation.
required='libtoolize gcc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# (pr401b.sh and pr401c.sh do the same for LTLIBOBJS and ALLOCA)
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir lib src
# (pr401.sh and pr401c.sh do the same for LIBOBJS and ALLOCA)
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
mkdir lib src
# (pr401.sh and pr401b.sh do the same for LIBOBJS and LTLIBOBJS)
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir lib src
# Empty _SOURCES results in $(LINK) undefined.
required=libtool
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# "make distcheck" fails when two source dirs exist.
required=cc
-. ./defs || exit 1
+. test-init.sh
subdirs="foo bar"
# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs. In fact,
# the entire 'support/' directory is omitted.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Test to make sure range of prefixes can be extended
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# examples in the Automake manual do not cause obvious errors.
# Please keep this test in sync with the automake manual.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# should work.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# cover more cases.
# See also test 'primary-prefix-valid-couples.test'.
-. ./defs || exit 1
+. test-init.sh
plan_ "later"
: > ar-lib
: > ltmain.sh
: > texinfo.tex
-: > elisp-comp
: > py-compile
: > config.guess
: > config.sub
# Test for valid prefix/primary combinations.
# See also test 'primary-prefix-invalid-couples.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
echo '@setfilename foo' > foo.texi
: > texinfo.tex
: > py-compile
-: > elisp-comp
: > ar-lib
# Setup Makefile.am.
# Test to make sure errors in am_install_var work.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = @programs@
# Test to make sure errors in am_install_var work.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# Make sure we can build programs ending in '.la'
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# Test on automake options '--print-data-dir' and '--print-script-dir'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
libdir=$($AUTOMAKE --print-libdir) || exit 1
case $libdir in /*);; *) exit 1;; esac
# Test for bug where when multiple scripts are installed,
# the check for AC_PROG_INSTALL fails.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_SCRIPTS = zardoz qbert brownie
# checks have been introduced in commit 'Release-1-9-254-g9d0eaef' into
# the former test 'subst2.test'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([FOO], [c])
# Test the '--basedir' option of the 'py-compile' script,
required=python
-. ./defs || exit 1
+. test-init.sh
# We'll need to create files in '..', so we need one more subdirectory
# level in order not to clutter up the top-level tests directory.
# 'py-compile-basic2.sh'.
required=python
-. ./defs || exit 1
+. test-init.sh
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# related test 'py-compile-basic.sh'.
required=python
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "getting current working directory"
# Test the '--destdir' option of the 'py-compile' script,
required=python
-. ./defs || exit 1
+. test-init.sh
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# Make sure 'py-compile' honours the PYTHON environment variable.
-. ./defs || exit 1
+. test-init.sh
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# explicitly terminate the option list for 'py-compile'.
required=python
-. ./defs || exit 1
+. test-init.sh
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
# Test 'py-compile --help', 'py-compile --version', and that 'py-compile'
# correctly complains on wrong usage.
-. ./defs || exit 1
+. test-init.sh
cp "$am_scriptdir/py-compile" . \
|| fatal_ "failed to fetch auxiliary script py-compile"
am_create_testdir=empty
required=python
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Test distribution of *_PYTHON files.
# This test does not require python.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PATH_PYTHON([], [:], [:])
am_create_testdir=empty
# An actual python is *not* required in this test.
-. ./defs || exit 1
+. test-init.sh
PYTHON=; unset PYTHON
# declaration.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AM_PATH_PYTHON
am_create_testdir=empty
required=python
-. ./defs || exit 1
+. test-init.sh
py_too_old ()
{
# advertised in the manual.
required=python
-. ./defs || exit 1
+. test-init.sh
# In case the user's config.site defines pythondir or pyexecdir.
CONFIG_SITE=/dev/null; export CONFIG_SITE
# This test also works as a mild stress-test on the python support.
required='cc python virtualenv'
-. ./defs || exit 1
+. test-init.sh
# In case the user's config.site defines pythondir or pyexecdir.
CONFIG_SITE=/dev/null; export CONFIG_SITE
# Test to make sure py_compile and am__py_compile are correctly defined.
-. ./defs || exit 1
+. test-init.sh
echo 'AM_PATH_PYTHON' >> configure.ac
# Test _PYTHON with conditionals.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_PATH_PYTHON
# Test missing python.
# Python is not required for this test.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
# Ensure DESTDIR is not included in byte-compiled files.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_PATH_PYTHON
# Make sure that Automake suggests using AM_PATH_PYTHON.
-. ./defs || exit 1
+. test-init.sh
$ACLOCAL
# Make sure we install built python files.
required=python
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AM_PATH_PYTHON
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that recursion on user-defined targets can be made to work
+# with "deeply" nested uses of $(SUBDIRS).
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/sub2/Makefile
+ sub1/sub2/sub3/Makefile
+ sub1/sub2/sub3/sub4/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+dirs='sub1 sub1/sub2 sub1/sub2/sub3 sub1/sub2/sub3/sub4'
+
+mkdir $dirs
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1
+
+foo-local:
+ cp sub1/foo foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test:
+ echo 'It works!' > exp
+ diff exp foo
+ diff exp sub1/foo
+ test ! -f sub1/sub2/foo
+ test ! -f sub1/sub2/sub3/foo
+ diff exp sub1/sub2/sub3/sub4/foo
+ rm -f exp
+
+all-local: foo
+check-local: test
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = sub2
+foo-local:
+ test ! -f sub2/sub3/foo
+ cp sub2/sub3/sub4/foo foo
+MOSTLYCLEANFILES = foo
+END
+
+# Here we deliberately lack an explicit definition the 'foo-local'
+# target; that shouldn't stop 'foo' recursion into subdirectory
+# 'sub3/sub4'.
+echo SUBDIRS = sub3 > sub1/sub2/Makefile.am
+echo SUBDIRS = sub4 > sub1/sub2/sub3/Makefile.am
+
+cat > sub1/sub2/sub3/sub4/Makefile.am <<'END'
+foo-local:
+ echo 'It works!' > foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for d in $dirs; do
+ $FGREP foo-am $d/Makefile.in || exit 1
+ case $d in
+ */sub4);;
+ *) $FGREP foo-recursive $d/Makefile.in || exit 1;;
+ esac
+done
+
+./configure
+
+$MAKE foo
+$MAKE test
+
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion works with various types of indirections
+# *involved in the definition of the '*-local' targets*: make macros,
+# AC_SUBST'd strings, automake-time file inclusions, automake
+# conditionals...
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/subsub/Makefile
+ sub2/Makefile
+ sub2/subsub/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_SUBST([FOO_LOCAL], [foo-local])
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub sub2 sub2/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+AM_FOO_LOCAL = foo-local
+
+$(AM_FOO_LOCAL):
+ pwd && : > foo
+CLEANFILES = foo
+
+all-local: foo
+check-local:
+ test -f foo
+ test -f sub1/foo
+ test -f sub1/subsub/foo
+ test -f sub2/foo
+ test -f sub2/subsub/foo
+ test ! -r sub2/subsub/bar
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub
+@FOO_LOCAL@:
+ pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub1/subsub/Makefile.am <<'END'
+$(FOO_LOCAL):
+ pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub2/Makefile.am <<'END'
+include $(srcdir)/bar.am
+include $(srcdir)/baz.am
+CLEANFILES = foo
+END
+
+echo 'SUBDIRS = subsub' > sub2/bar.am
+echo 'foo-local: ; pwd && : > foo' > sub2/baz.am
+
+cat > sub2/subsub/Makefile.am <<'END'
+if COND
+foo-local:
+ pwd && : > foo
+CLEANFILES = foo
+else !COND
+foo-local:
+ pwd && : > bar
+endif !COND
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion works with "make -k".
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub1/subsub1/Makefile
+ sub2/Makefile
+ sub2/subsub2/Makefile
+ sub3/Makefile
+])
+FAIL='@echo "FAIL $@ in `pwd`"; exit 1'
+PASS='@echo "PASS $@ in `pwd`"; : > foo'
+AC_SUBST([FAIL])
+AC_SUBST([PASS])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub1 sub2 sub2/subsub2 sub3
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub2 sub3
+foo-local:; @FAIL@
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub1
+foo-local:; @PASS@
+END
+
+cat > sub2/Makefile.am <<'END'
+SUBDIRS = subsub2
+foo-local:; @FAIL@
+END
+
+echo 'foo-local:; @FAIL@' > sub1/subsub1/Makefile.am
+echo 'foo-local:; @PASS@' > sub2/subsub2/Makefile.am
+echo 'foo-local:; @PASS@' > sub3/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat > exp <<END
+./sub1/foo
+./sub2/subsub2/foo
+./sub3/foo
+END
+
+as_expected ()
+{
+ find . -name foo > t || { cat t; exit 1; }
+ LC_ALL=C sort t > got
+ cat exp
+ cat got
+ diff exp got
+}
+
+# Without "-k", we fail in 'sub1/subsub1', and do nothing else.
+# So, no 'foo' file gets created.
+$MAKE foo && exit 1
+find . -name foo | grep . && exit 1
+
+if using_gmake; then
+ $MAKE -k foo && exit 1
+ as_expected
+ $MAKE --keep-going foo && exit 1
+ as_expected
+else
+ # Don't trust the exit status of 'make -k' for non-GNU makes.
+ $MAKE -k foo || :
+ as_expected
+fi
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that many user-defined recursive targets can be supported
+# at once, and that calls to 'AM_EXTRA_RECURSIVE_TARGETS' are
+# cumulative.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+## NOTE: extra white spaces, tabs, newlines and backslashes in the
+## lines below: on purpose.
+AM_EXTRA_RECURSIVE_TARGETS([ foo \
+ bar ])
+AC_SUBST([CLEANFILES], ['foo bar baz'])
+AC_OUTPUT
+# Yes, this appears after AC_OUTPUT. So what?
+AM_EXTRA_RECURSIVE_TARGETS([baz])
+END
+
+mkdir sub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+foo-local:
+ : > foo
+bar-local:
+ echo x > bar
+baz-local: ; touch baz
+check-local: foo bar baz
+ ls -l . sub ;: For debugging.
+ test -f foo
+ test -f bar
+ test -f baz
+ test -f sub/foo
+ test -f sub/bar
+ test -f sub/baz
+END
+
+cat > sub/Makefile.am <<'END'
+foo-local bar-local baz-local:
+ touch `echo $@ | sed 's/-local$$//'`
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for t in foo bar baz; do
+ $FGREP "$t-am" Makefile.in
+ $FGREP "$t-am" sub/Makefile.in
+done
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion can be made to work even when $(SUBDIRS)
+# is empty or undefined.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+# First try with undefined $(SUBDIRS).
+cat > Makefile.am <<'END'
+all-local: foo
+foo-local:
+ : > bar
+MOSTLYCLEANFILES = bar
+END
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
+
+$MAKE distclean
+test ! -r bar # Sanity check.
+
+# Now try with empty but defined $(SUBDIRS).
+echo SUBDIRS = >> Makefile.am
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
+
+:
#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that, in cygnus mode, target "check" does not depend target
-# "all".
+# Check that user recursion works even for targets that don't exist
+# in the top-level Makefile.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo-bar])
AC_OUTPUT
END
+mkdir sub
+
cat > Makefile.am <<'END'
-all-local:
- : > all-target-has-failed
- exit 1
-check-local:
- touch check-target-has-run
+SUBDIRS = sub
+all-local: foo-bar
END
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && exit 1
+cat > sub/Makefile.am <<'END'
+foo-bar-local:
+ : > foo-bar
+MOSTLYCLEANFILES = foo-bar
+END
+$ACLOCAL
$AUTOCONF
+$AUTOMAKE
+
./configure
-$MAKE check
-test -f check-target-has-run
-test ! -e all-target-has-failed
-# Sanity checks.
-$MAKE && exit 1
-test -f all-target-has-failed
+$MAKE foo-bar
+test -f sub/foo-bar
:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that override of user-defined recursive targets work as
+# expected.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foobar zardoz])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+all-local: foobar zardoz
+foobar:
+ : > foobar.out
+MOSTLYCLEANFILES = foobar.out
+check-local:
+ test -f foobar.out
+ test ! -r sub/foobar.out
+ test -f sub/zardoz.out
+ test ! -r sub/baz.out
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+foobar foobar-local:
+ : > foobar.out
+zardoz-local:
+ : > baz.out
+zardoz:
+ : > zardoz.out
+MOSTLYCLEANFILES = zardoz.out
+END
+
+$ACLOCAL
+$AUTOCONF
+
+AUTOMAKE_fails
+grep '^Makefile\.am:3:.*user target.*foobar' stderr
+grep '^Makefile\.am:.*foobar-local.*instead of foobar$' stderr
+grep '^sub/Makefile\.am:5:.*user target.*zardoz' stderr
+grep '^sub/Makefile\.am:.*zardoz-local.*instead of zardoz$' stderr
+
+$AUTOMAKE -Wno-override
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
#! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that, in cygnus mode, maintainer mode is required.
+# Check that user-defined recursive targets and their associate
+# '-local', '-am' and '-recursive' targets are declared as phony.
-. ./defs || exit 1
-
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails -Wno-obsolete --cygnus
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+# Require GNU make, because some vendo makes (e.g., Solaris) doesn't
+# truly respect .PHONY.
+required=GNUmake
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
SUBDIRS = sub
+foo-local:
+ echo 'GOOD!' > foo
END
mkdir sub
cat > sub/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete cygnus
+foo-local:
+ echo 'GOOD!' > foo
END
-rm -rf autom4te.cache
+dummy_files='
+ foo
+ foo-local
+ foo-am
+ foo-recursive
+ sub/foo
+ sub/foo-local
+ sub/foo-am
+'
+
$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+$AUTOCONF
+$AUTOMAKE
+./configure
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-END
+touch $dummy_files
-rm -rf autom4te.cache
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
+$MAKE foo
+grep 'GOOD!' foo
+grep 'GOOD!' sub/foo
:
#! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012 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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure distclean works in cygnus mode.
-# Report from Daniel Jacobowitz.
+# Check that rules generated by user recursion are apt to be wrapped
+# by other makefiles.
-. ./defs || exit 1
+required=GNUmake
+. test-init.sh
cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([extra])
+AC_CONFIG_FILES([src/Makefile])
AC_OUTPUT
END
-cat > Makefile.am << 'END'
-SUBDIRS = sub
+mkdir src
+echo SUBDIRS = src > Makefile.am
+echo 'bar: ; : > $@ ' > src/Makefile.am
-data_DATA = bar
-
-bar:
- touch $@
-
-DISTCLEANFILES = bar
-END
-
-mkdir sub
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
-cat > sub/Makefile.am << 'END'
-data_DATA = foo
+./configure
-foo:
- touch $@
+$MAKE extra
+test ! -f extra-local
+test ! -f src/bar
-CLEANFILES = $(data_DATA)
+cat > GNUmakefile << 'END'
+.DEFAULT_GOAL = all
+extra-local:
+ : > $@
+include ./Makefile
END
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
+cat > src/GNUmakefile << 'END'
+include ./Makefile
+extra-local: bar
+END
-./configure
-$MAKE
-ls -l
-test -f bar
-test -f sub/foo
-$MAKE distclean
-ls -l
-test ! -e bar
-test ! -e sub/foo
-test ! -e Makefile
-test ! -e config.status
-test -f Makefile.in
-test -f configure
+$MAKE extra
+test -f extra-local
+test -f src/bar
:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Basic checks on user-defined recursive rules.
+# Check that user recursion respect $(SUBDIRS) order,
+# and proceeds in a depth-first fashion.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+ sub1/Makefile
+ sub2/Makefile
+ sub3/Makefile
+ sub3/deeper/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub3/deeper
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub3 sub2
+foo-local:
+ echo '.' >> $(top_builddir)/got
+.PHONY: test
+test: foo
+ cat $(srcdir)/exp
+ cat ./got
+ diff $(srcdir)/exp ./got
+check-local: test
+MOSTLYCLEANFILES = got
+EXTRA_DIST = exp
+END
+
+for i in 1 2 3; do
+ cat > sub$i/Makefile.am <<END
+foo-local:
+ echo 'sub$i' >> \$(top_builddir)/got
+END
+done
+
+echo SUBDIRS = deeper >> sub3/Makefile.am
+
+cat >> sub3/deeper/Makefile.am <<'END'
+foo-local:
+ echo sub3/deeper >> $(top_builddir)/got
+END
+
+cat >> exp <<'END'
+sub1
+.
+sub3/deeper
+sub3
+sub2
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that user recursion can be made to work when $(SUBDIRS) are
+# not "strictly" nested, as in e.g.:
+# SUBDIRS = src external/lib external/tests
+# with no Makefile in 'external'.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES(
+ sub1/Makefile
+ sub2/Makefile
+dnl There's deliberately no 'sub3/Makefile'.
+ sub3/subsub/Makefile
+ sub4/Makefile
+ sub4/subsub/Makefile
+)
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub4 sub3/subsub sub4/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2 sub3/subsub sub4 sub4/subsub
+
+foo-local:
+ echo _rootdir_ >foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test: foo
+ grep _rootdir_ foo
+ grep ':sub1:' sub1/foo
+ grep ',sub1,' sub1/bar
+ test ! -r sub2/foo
+ test ! -r sub3/foo
+ grep '%sub3/subsub%' sub3/subsub/quux
+ test ! -r sub3/subsub/foo
+ test ! -r sub4/foo
+ grep '=sub4/subsub=' sub4/subsub/foo
+
+check-local: test
+END
+
+# A 'foo-local' target with dependencies shouldn't cause problems.
+cat > sub1/Makefile.am <<'END'
+foo-local: bar
+ sed 's/,/:/g' bar >foo
+bar:
+ echo ',sub1,' >$@
+MOSTLYCLEANFILES = foo bar
+END
+
+# The lack of a 'foo' target here shouldn't cause any error in
+# automake nor in make.
+: > sub2/Makefile.am
+
+# The lack of file 'sub3/Makefile.am' shouldn't cause any problem either.
+rm -f sub3/Makefile.am
+
+# A 'foo-local' creating a file != 'foo' shouldn't cause any problem.
+cat > sub3/subsub/Makefile.am <<'END'
+foo-local:
+ echo '%sub3/subsub%' >quux
+MOSTLYCLEANFILES = quux
+END
+
+# No 'foo-local' nor 'foo' target here ...
+: > sub4/Makefile.am
+# ... should not cause errors, nor cause the 'foo-local' target
+# here not to be executed.
+cat > sub4/subsub/Makefile.am <<'END'
+foo-local:
+ echo '=sub4/subsub=' >foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
# Test Automake-provided internal make macro $(am__relativize).
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ later
# See how well the rebuild rule handles an aclocal.m4 that was
# generated for another version of autoconf.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >>configure.ac
# Test remake rules when acinclude.m4 or its prerequisites change.
# Keep in sync with the other sister tests 'remake-after-*.sh'.
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# Test remake rules when aclocal.m4 or its prerequisites change.
# Keep in sync with the other sister tests 'remake-after-*.sh'.
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# Test remake rules when configure.ac or its prerequisites change.
# Keep in sync with the other sister tests 'remake-after-*.sh'.
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# Test remake rules when Makefile.am or its prerequisites change.
# Keep in sync with the other sister tests 'remake-after-*.sh'.
-. ./defs || exit 1
+. test-init.sh
if using_gmake; then
remake_() { $MAKE nil; }
# Check that the "all" target triggers rebuilt of outdated Makefiles.
# See also sister test 'remake-all-2.sh'.
-. ./defs || exit 1
+. test-init.sh
mkfile=Makefile
# This handle the case in which the makefiles are not called 'Makefile'.
# See also sister test 'remake-all-1.sh'.
-. ./defs || exit 1
+. test-init.sh
mkfile=foobar
# big deal in practice (in fact, this test *currently fails*). Still,
# keeping the limitation exposed is a good idea anyway.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# rules don't break in obvious ways in a slightly "heavier than usual"
# setup.
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "getting current working directory"
# of the "deleted header problem". This test checks deeper inclusion
# stacks, and use VPATH builds.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# of the "deleted header problem". This test does the check when the
# SUBDIRS variable is involved.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
# Check that inclusion of '.am' fragments by automake does not suffer
# of the "deleted header problem". Basic checks are done here.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# header file" issue w.r.t. aclocal.m4 dependencies. See also related
# test 'acloca22.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
FOO_MACRO
# Make sure remaking rules fail when they should.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# for more info).
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# for more info).
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_HEADERS([config.h])
# for more info).
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_HEADERS([config.h])
# - remake-include-configure.sh
# - remake-include-makefile.sh
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
fi
cat >> configure.ac <<END
+AC_CONFIG_MACRO_DIR([m4])
FINGERPRINT='my_fingerprint'
AC_SUBST([FINGERPRINT])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: nil
nil:
## Used by "make distcheck" later.
mkdir m4
echo 'AC_DEFUN([my_fingerprint], [BadBadBad])' > m4/foo.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
# - remake-include-aclocal.sh
# - remake-include-makefile.sh
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# - remake-include-configure.sh
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# big deal in practice (in fact, this test *currently fails*). Still,
# keeping the limitation exposed is a good idea anyway.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
m4_include([foobar.m4])
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the aclocal honouring of AC_CONFIG_MACRO_DIR interacts
+# nicely with automatic rebuild rules.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([macro-dir])
+my__FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+mkdir macro-dir
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > bar])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+$FGREP my__FOO configure && exit 1
+
+./configure
+test -f bar
+rm -f bar
+
+$sleep
+
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > baz])
+END
+
+$MAKE Makefile
+test -f baz
+test ! -r bar
+rm -f baz
+
+$sleep
+
+rm -f macro-dir/foo.m4
+cat > macro-dir/quux.m4 <<'END'
+AC_DEFUN([my__FOO], [: > quux])
+END
+
+$MAKE Makefile
+test -f quux
+test ! -r baz
+rm -f quux
+
+$sleep
+
+sed 's/^AC_CONFIG_MACRO_DIR/&([newdir])/' configure.ac > t
+mv -f t configure.ac
+
+mkdir newdir
+cat > newdir/mu.m4 <<'END'
+AC_DEFUN([my__FOO], [[: my__FOO do nothing]])
+END
+
+$MAKE Makefile
+$FGREP ': my__FOO do nothing' configure
+
+$MAKE distcheck
+
+:
# but not all.
# Report from Ralf Corsepius.
-. ./defs || exit 1
+. test-init.sh
if using_gmake; then
remake="$MAKE"
# Keep this in sync with sister test 'remake-makefile-vpath.sh', which
# performs the same checks for a VPATH build.
-. ./defs || exit 1
+. test-init.sh
mv -f configure.ac configure.stub
rm -f quux
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal. Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
$sleep
mkdir $srcdir/m4
cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
check-local:
cat quux
grep '%Foo%' quux
test x'$(QUUX)' = x'%Foo%'
END
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
# Modify configure.ac and aclocal.m4.
$sleep
cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([quux])
MY_CUSTOM_MACRO
AC_OUTPUT
# Keep this in sync with sister test 'remake-makefile-instree.sh', which
# performs the same checks for a in-tree build.
-. ./defs || exit 1
+. test-init.sh
mv -f configure.ac configure.stub
rm -f quux
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal. Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
$sleep
mkdir $srcdir/m4
cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
check-local:
cat quux
grep '%Foo%' quux
test x'$(QUUX)' = x'%Foo%'
END
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
# Modify configure.ac and aclocal.m4.
$sleep
cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([quux])
MY_CUSTOM_MACRO
AC_OUTPUT
# Test basic remake rules for Makefiles with non-default names
# and/or with multiple sources.
-. ./defs || exit 1
+. test-init.sh
magic1=::MagicStringOne::
magic2=__MagicStringTwo__
# Test remake rules when m4 files get moved among different "include
# dirs" (i.e. those passed to aclocal with '-I' option).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
MY_MACRO
#
# Report from Akim Demaille.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
# Rebuild rule are ok until make dist, but not afterwards.
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Remake rules and user-defined recursive rules.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+m4_include([extra-targets.m4])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([foo])' > extra-targets.m4
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+all-local: foo
+foo-local:
+ : > foo
+bar-local:
+ : > bar
+MOSTLYCLEANFILES = foo
+END
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+foo-local:
+ : > foo2
+MOSTLYCLEANFILES = foo2
+bar-local: later-target
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+test -f foo
+test -f sub/foo2
+test ! -f bar
+test ! -f sub/zardoz
+$MAKE distcheck
+
+$sleep
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([bar])' >> extra-targets.m4
+
+cat >> Makefile.am <<'END'
+MOSTLYCLEANFILES += bar oof
+all-local: bar
+foo-local: oof
+oof:
+ : > $@
+END
+
+echo 'include $(srcdir)/more.am' >> sub/Makefile.am
+
+cat > sub/more.am << 'END'
+later-target:
+ : > zardoz
+DISTCLEANFILES = zardoz
+END
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f foo
+test -f oof
+test -f sub/foo2
+test -f bar
+test -f sub/zardoz
+$MAKE distcheck
+
+:
# of the "deleted header problem". This test checks that we can rename
# an included .am file without confusing the remake rules.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test remake rules when m4 files get renamed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
MY_MACRO
# an m4 macro in it gets renamed. Kudos to Bruno Haible for thinking
# about this situation. See also related test 'acloca22.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
MY_MACRO
# Test remake rules when the name of an m4 macro change. Try both with
# and without indirection.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
MY_MACRO
# See also the other similar tests 'remake-subdir*.sh', and the
# related test 'aclocal5.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
m4_include([subdirs.m4])
# related test 'aclocal5.sh'
required=GNUmake
-. ./defs || exit 1
+. test-init.sh
magic1='::MagicString::One::'
magic2='__MagicString__Two__'
# are correctly generated.
# See also sister functional test 'remake-subdir-only.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# an explicit delay in the build process.
# Suggestion by Ralf Wildenhues.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<END
AC_INIT([$me], [1.0])
# Ensure that remake rules work for files in a subdirectory even when
# there is no Makefile for that subdirectory.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/foo])
# Make sure remaking rules in subdir are correctly generated.
# See also sister "grepping" test 'remake-subdir-grepping.sh'.
-. ./defs || exit 1
+. test-init.sh
fingerprint='=/FiNgErPrInT/='
# See also the other similar tests 'remake-subdir*.sh', and the
# related test 'aclocal5.sh'.
-. ./defs || exit 1
+. test-init.sh
if using_gmake; then
remake=$MAKE
# See also the other similar tests 'remake-subdir*.sh', and the
# related test 'aclocal5.sh'.
-. ./defs || exit 1
+. test-init.sh
magic1='::MagicString::One::'
magic2='__MagicString__Two__'
# Make sure remaking rules work when subdir Makefile.in has been removed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
{
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- test $(grep -c " --run " stdout) -eq 1
+ test $(grep -c "/missing " stdout) -eq 1
}
# Now, we are set up. Ensure that, for either missing Makefile.in,
# make by hand. Thus, fixing it would not be worth the hassle, but
# we prefer to keep it exposed anyway.
-. ./defs || exit 1
+. test-init.sh
# We'll use calls to stat to get debugging information.
if stat /dev/null; then stat=stat; else stat=:; fi
# generate broken or incorrect makefiles.
required='cc bzip2'
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
AC_INIT([$me], [1.0])
# Test to make sure macro used in m4 file is included.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE], [AM_INIT_AUTOMAKE([whocares])])
END
$ACLOCAL
# Make sure Automake will install several copies of required files if needed.
# Reported by Marius Vollmer.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<EOF
AC_CONFIG_FILES([one/Makefile two/Makefile])
# to fix the Makefiles.)
required='libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([req2], [1.0])
# Test to make sure RULE_PATTERN catches strange targets.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
$(srcdir)/Makefile.am:
# Unsafe absolute directory names should be diagnosed.
-. ./defs || exit 1
+. test-init.sh
mkdir 'unsafe$'
cd 'unsafe$'
# Test to make sure C-but-not-CC error works.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
# Sanity check on the function used by the automake testsuite to
# analyze output of "configure --help".
-. ./defs || exit 1
+. test-init.sh
# FIXME: this test is a good candidate for a conversion to TAP.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Sanity check for the automake testsuite.
-# Check that tests using './defs' create a proper temporary directory,
-# and run in it. Also check that we can prevent the pre-population
-# and the creation of such directory if we want.
+# Check that tests using 'test-init.sh' create a proper temporary
+# directory, and run in it. Also check that we can prevent the
+# pre-population and the creation of such directory if we want.
am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
plan_ 5
rm -rf _self.dir || framework_failure_ "cleaning up _self.dir"
command_ok_ "$1 [$2]" $AM_TEST_RUNNER_SHELL -c "
$2
- . ./defs || exit 99
+ . test-init.sh
# Don't fail if 'ls -l' fails; avoids possible racy spurious failures.
pwd; ls -l || : # For debugging.
$3
# Sanity check for the automake testsuite.
# Check that, in case of failing commands, the correct exit status is
-# passed to the exit trap installed by the './defs' script.
+# passed to the exit trap installed by the 'test-init.sh' script.
# Also check that the 'errexit' shell flag is active.
am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
plan_ 32
set +e
# It's especially important that the 'unset' is done before sourcing
-# ./defs, i.e., when 'set -e' is not active yet, for the benefit of shells
-# (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a non-zero status
-# when unsetting an already-unset variable.
-# Add an extra newline at the end so that the aliases defined by 'defs'
-# can take effect. Yes, this is truly required.
-init="stderr_fileno_=2; unset am_explicit_skips; . ./defs${nl}"
+# test-init.sh, i.e., when 'set -e' is not active yet, for the benefit
+# of shells (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a
+# non-zero status when unsetting an already-unset variable.
+# Add an extra newline at the end so that the aliases defined by
+# test-init.sh can take effect. Yes, this is truly required.
+init="stderr_fileno_=2; unset am_explicit_skips;. test-init.sh${nl}"
-# Required so that the code in defs doesn't go crazy trying to creating a
+# Required so that the code in test-init.sh doesn't go crazy trying to creating a
# temporary directory in the absolute dir of $AM_TEST_RUNNER_SHELL.
dummy_test_script=t/$me.sh
# an early exit due to some command exiting unexpectedly with status 77.
am_create_testdir=no
-. ./defs || exit 1
+. test-init.sh
set +e
{
env $2 $AM_TEST_RUNNER_SHELL -c "
am_create_testdir=no
- . ./defs
+ . test-init.sh
$1
" dummy.sh
}
# shell function.
am_create_testdir=no
-. ./defs || exit 99
+. test-init.sh
plan_ 2
# Sanity check for the automake testsuite: the 'is_newest' subroutine.
-. ./defs || exit 1
+. test-init.sh
plan_ 21
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Sanity check for the automake testsuite.
-# Make sure that $me gets automatically defined by './defs'.
+# Make sure that $me gets automatically defined by 'test-init.sh'.
am_create_testdir=no
-. ./defs || exit 1
+. test-init.sh
plan_ 12
{
$AM_TEST_RUNNER_SHELL -c '
am_create_testdir=no # Do not pollute the top-level directory.
- . ./defs
+ . test-init.sh
echo me=$me
' "$1" | grep "^me=$2$"
command_ok_ "me=$1" test $? -eq 0
s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
# Do not pollute the top-level directory.
am_create_testdir=no
- . ./defs
+ . test-init.sh
echo me=$me
' foo.sh)
-command_ok_ "override of \$me before ./defs causes no error" \
+command_ok_ "override of \$me before test-init.sh causes no error" \
test $? -eq 0
r='ok'
unset stderr_fileno_ || :
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
set +e
# Sanity check for the automake testsuite.
# Check the 'seq_' subroutine.
-. ./defs || exit 1
+. test-init.sh
plan_ 14
# Sanity check for the automake testsuite.
# Check the 'unindent' subroutine.
-. ./defs || exit 1
+. test-init.sh
plan_ 22
# Option 'serial-tests'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
hasnt_parallel_tests ()
{
# from config.site, and that this default can be overridden from
# either the ./configure or make command line.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
-AM_SILENT_RULES
+# This line will be edited later to force silent-rules default.
AC_OUTPUT
EOF
: 'Disable by default in configure.ac, enable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([no])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*silent-rules default.*/AM_SILENT_RULES([no])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
: 'Enable by default in configure.ac, disable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([yes])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*AM_SILENT_RULES.*/AM_SILENT_RULES([yes])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
# Check silent-rules mode for Lex.
required='cc lex'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_LEX
AC_CONFIG_FILES([sub/Makefile])
# 'silent-many-generic.sh', which should work with generic compilers.
required='gcc g++ gfortran lex yacc'
-. ./defs || exit 1
+. test-init.sh
# Avoids too much code duplication.
do_and_check_silent_build ()
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_F77
# and forces the use of gcc depmode.
required='cc c++ fortran fortran77 lex yacc'
-. ./defs || exit 1
+. test-init.sh
# Avoids too much code duplication.
do_and_check_silent_build ()
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_F77
AC_PROG_FC
# Check silent-rules mode, on 'make' implementations that do not
# support nested variables (Bug#9928, Bug#10237).
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AM_SILENT_RULES
+++ /dev/null
-#!/bin/sh
-# Copyright (C) 2011-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that the 'silent-rules' mode suppresses the warnings for recursive
-# make variable expansions. This should happen regardless of whether and
-# where these warnings are requested.
-
-. ./defs || exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-# Yes, we repeat the warnings two times, both before and after
-# 'silent-rules'. This is deliberate.
-AM_INIT_AUTOMAKE([gnu -Wall -Wportability-recursive
- silent-rules
- -Wall -Wportability-recursive])
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = gnu -Wall -Wportability-recursive
-foo = $($(v)) $(x$(v)) $($(v)x) $(y$(v)z)
-END
-
-# Files required bu gnu strictness.
-touch AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
-
-$ACLOCAL
-$AUTOMAKE --gnu -Wall -Wportability-recursive
-
-:
+++ /dev/null
-#!/bin/sh
-# Copyright (C) 2009-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Some checks about silent-rules mode and warnings.
-
-. ./defs || exit 1
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-my_verbose = $(my_verbose_$(V))
-my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
-my_verbose_0 = @echo " PKG-GEN $@";
-foo: foo.in
- $(my_verbose)cp $(srcdir)/foo.in $@
-EOF
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([-Wall])
-AC_CONFIG_FILES([Makefile])
-END
-
-rm -rf autom4te*.cache
-$ACLOCAL
-AUTOMAKE_fails
-grep 'my_verbose_\$(V.*non-POSIX ' stderr
-$AUTOMAKE -Wno-error
-
-# AM_SILENT_RULES should turn off the warning.
-echo 'AM_SILENT_RULES' >> configure.ac
-rm -rf autom4te*.cache
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-# The 'silent-rules' option to AM_INIT_AUTOMAKE should work likewise.
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([silent-rules])
-AC_CONFIG_FILES([Makefile])
-END
-rm -rf autom4te*.cache
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-:
# involved (i.e., the '-d' option is in *YFLAGS).
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_YACC
AC_PROG_CC
AC_OUTPUT
# Keep this in sync with sister test 'silent-yacc-gcc.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_YACC
AC_CONFIG_FILES([sub/Makefile])
# Please keep this file in sync with 'silent2.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
# Please keep this file in sync with 'silent.sh'.
required=gcc
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
# Please keep this file in sync with 'silent4.sh' and 'silent9.sh'.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
# Please keep this file in sync with 'silent3.sh' and 'silent9.sh'.
required="libtoolize gcc"
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
# Check user extensibility of silent-rules mode.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
mkdir sub
cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
my_verbose = $(my_verbose_$(V))
my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
my_verbose_0 = @echo " XGEN $@";
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check user extensibility of silent-rules mode.
+# Aslo check that silent rules are disabled by default.
-. ./defs || exit 1
+. test-init.sh
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
all-local: foo
$AUTOMAKE --add-missing
$AUTOCONF
-./configure --disable-silent-rules
+# Silent rules are disabled by default, since we haven't called
+# "AM_SILENT_RULES([yes])" explicitly.
+./configure
$MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
-# Ensure that setting 'silent-rules' in a Makefile.am produces an error.
-echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
-AUTOMAKE_fails --force
-
:
# Check texinfo rules in silent-rules mode.
-required='makeinfo-html tex texi2dvi-o dvips'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi dvips'
+. test-init.sh
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
info_TEXINFOS = foo.texi
# Please keep this file in sync with 'silent3.sh' and 'silent4.sh'.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
# test 'silentcxx.sh', which should work with generic compilers.
required=g++
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
# and forces the use of gcc depmode.
required=c++
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
# Keep this ins sync with the sister test 'silentf90.sh'.
required=fortran77
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_F77
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
# Keep this ins sync with the sister test 'silentf77.sh'.
required=fortran
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_FC
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
# Test to make sure subdir source file generates explicit dependency.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz widdershins
# Test leading space on macro assignment.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
# (CXXFLAGS, YFLAGS, LDFLAGS, ...)
-. ./defs || exit 1
+. test-init.sh
# Disable shell globbing if possible.
(set +f) >/dev/null 2>&1 && set +f
# conditionals are present.
# From Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# The true/false example from the manual, plus a check for _SHORTNAME.
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# use of _CPPFLAGS (PR/337).
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Another check for per-target flag substitutions.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure misspellings in _SOURCES variables cause failure.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz foo
# Test to make sure misspellings in _SOURCES variables cause failure.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# Test to make sure some internal _DEPENDENCIES variables don't cause
# errors.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TAGS_DEPENDENCIES = joe
# Test to make sure that misspelled prefixes actually cause error.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'EOF'
bni_PROGRAMS = zot
# <http://austingroupbugs.net/view.php?id=542>
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 10
# So it seems only non-overlapping ::-rule may be portable. This is
# what we check now.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile <<\EOF
a :: b
# Test to make sure config substitution in _SOURCES fails.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >> configure.ac
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure stamp-h* files are created where we expect
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << END
-AM_CONFIG_HEADER([1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin])
-# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
AC_CONFIG_HEADERS([sdir1/4.h
sdir1/5.h:config.hin
sdir1/6.h:sdir1/config1.hin
# Report by Kent Boortz.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test "not a standard library" error.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check for AM_LDFLAGS = -module
# Report from Kevin P. Fleming.
required=libtool
-. ./defs || exit 1
+. test-init.sh
: > README
: > NEWS
# been in place for quite a long time); see also Automake bug #7673.
# Update this test if the semantics are changed.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# strictness specified later should take precedence over strictness
# specified earlier.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Test for install-strip.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# This test needs GNU binutils strip. See sister test 'strip3.sh'.
required='cc strip'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# test 'strip2.sh'.
required='cc libtoolize strip'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# SUBDIRS + AC_SUBST setup from the manual.
# Lots of lines here are duplicated in 'subcond-am-cond.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
if test "$want_opt" = yes; then
# test 'subdir-add2-pr46.sh' do it from a subdirectory.
# PR automake/46
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# it works when make is run from the top-level directory.
# PR automake/46
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([m4])
m4_include([confiles.m4])
MORE_DEFS
AC_OUTPUT
cat > Makefile.am << 'END'
SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
END
mkdir sub
mkdir m4
echo 'AC_DEFUN([MORE_DEFS], [])' > m4/moredefs.m4
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
./configure
# SUBDIRS + AM_CONDITIONAL setup from the manual.
# Lots of lines here are duplicated in 'subdir-ac-subst.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
# Check SUBDIRS set based on conditionals.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([TEST], [true])
# It is ok to have a conditional SUBDIRS when using gettext.
required=gettext
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_GNU_GETTEXT
# Check that "./configure && make && make distclean" is actually a
# no-op, even when conditional SUBDIRS are involved.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
# SUDBIRS with $fail set in the environment.
-. ./defs || exit 1
+. test-init.sh
mkdir sub
# The $(SUDBIRS) entries are processed in the order they are specified.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([
# Test to make sure sub-sub-dirs work correctly.
-. ./defs || exit 1
+. test-init.sh
mkdir one
mkdir one/two
# Test SUDBIRS with '/' in them.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
# Test to make sure install-sh and mkinstalldirs correctly found in
# subdirs.
-. ./defs || exit 1
+. test-init.sh
mkdir zot
# 'subobj-clean-pr10697.sh', which deals with the non-libtool case.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_AR
# 'subobj-clean-lt-pr10697.sh', which deals with the libtool case.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test of subdir objects with C.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# PR 492: Test asm subdir-objects.
required=gcc
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# 'subobj11c.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also "semantic" sister test 'subobj11a.sh', and related test
# 'subobj11c.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# included makefile fragments (containing dependency info).
# See also related tests 'subobj11a.sh' and 'subobj11b.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test of subdir objects with C++.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Make sure '../foo/foo.cpp' generates a rule.
# Report from Dave Brolley.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# From Robert Collins.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([generic/Makefile])
# From Robert Collins.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_CC_C_O
# Test to make sure AM_CFLAGS appears in subdir compilation rule.
# Report from Steve M. Robbins.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Make sure 'compile' is included when subdir-objects is used in a subdir.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# forgets '.../<file>.o'.
required='c++ libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# combinational explosion. (This test is named after the &subobjname
# sub in Automake).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# properly, when a subpackage is involved.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Check subpackage handling.
required=cc
-. ./defs || exit 1
+. test-init.sh
mkdir m4
EOF
cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SUBDIRS([lib])
FOO
END
dist-hook:
test -f $(distdir)/LDADD.c
test -f $(top_distdir)/LDADD.c
-
-ACLOCAL_AMFLAGS = -I m4
EOF
cat >LDADD.c <<'EOF'
cat >lib/configure.ac <<'EOF'
AC_INIT([lib], [2.3])
AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([../m4])
AM_PROG_AR
AC_PROG_RANLIB
AC_CONFIG_HEADERS([config.h:config.hin])
test -f $(top_distdir)/LDADD.c
test -f $(distdir)/src/x.c
test ! -f $(top_distdir)/src/x.c
-
-ACLOCAL_AMFLAGS = -I ../m4
EOF
cat >lib/src/x.c <<'EOF'
}
EOF
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wno-override
cd lib
-$ACLOCAL -I ../m4
+$ACLOCAL
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
$AUTOHEADER
# Try a DIST_SUBDIRS subpackage with no SUBDIRS.
# Report from Gary V. Vaughan.
-. ./defs || exit 1
+. test-init.sh
mkdir m4
EOF
cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SUBDIRS([sub])
AC_OUTPUT
END
cat >sub/configure.ac <<'EOF'
AC_INIT([sub], [2.3])
AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([../m4])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([script])
FOO
EOF
: >sub/script.in
-echo ACLOCAL_AMFLAGS = -I ../m4 > sub/Makefile.am
+: >sub/Makefile.am
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
cd sub
-$ACLOCAL -I ../m4
+$ACLOCAL
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
$AUTOMAKE -Wno-override
./configure
$MAKE distcheck
+
+:
# Make sure different subpackages may share files and directories.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<'END'
SUBDIRS = subpkg
# Test to ensure 'distdir' fixes the mode of files and directories
# copied into '$(distdir)', even with sub-packages.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<'END'
SUBDIRS = subpkg
# These checks have been introduced in commit 'Release-1-9-254-g9d0eaef'
# into the former test 'subst2.test'.
-. ./defs || exit 1
+. test-init.sh
# These are deliberately quite long, so that the xxx_PROGRAMS definition
# in Makefile.am below will be split on multiple lines, with the last
# Test that AC_SUBST($1) does something sensible. From Ulrich
# Drepper.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
dnl This test used to have the following lines, which cannot have
# 'nobase.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AC_PROG_CC
# Test AM_SUBST_NOTMAKE.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
myrule="\
# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
# needs to list possible values of that substitution, literally.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# Test for bug in variable substitution references, where
# undefined variables break later substitutions.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [whocares])
# pattern is null.
# Report from Richard Boulton.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [whocares])
# Test that substitutions in variables work.
# From Lars J. Aas.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_SOURCE([fakelib.c])
# See automake bug#7824 and bug#7670.
required=cc
-. ./defs || exit 1
+. test-init.sh
plan_ 8
# Reported by Florian Briegel.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# Reported by John Ratliff.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<EOF
AC_PROG_CC
# only once.
# See also related test 'suffix2.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# (related to PR/37)
required='cc libtoolize yacc'
-. ./defs || exit 1
+. test-init.sh
plan_ 7
# We also check for suffixes containing '-'.
required=cc
-. ./defs || exit 1
+. test-init.sh
plan_ 10
# See also related test 'suffix.sh'.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that suffix rules chain.
required=c++
-. ./defs || exit 1
+. test-init.sh
plan_ 10
# Also make sure that .SUFFIXES is automatically adjusted with
# extensions from implicit rules.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
.k.o:
# Based on a report from Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.
required='cc libtool'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([LINK], [:])
# '.$(OBJEXT)'. See also related "semantic" tests 'suffix6b.sh'
# and 'suffix6c.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUFFIXES = a b .$(OBJEXT) c .o .obj
# extensions. Se also related "grepping" test 'suffix6.sh'.
required=GNUmake # Other makes might not grok dot-less suffix rules.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
# $(LINK) is not defined automatically by Automake, since the *_SOURCES
# Test to make sure that '.o' and '.obj' are handled like '.$(OBJEXT)'.
# See also related "grepping" test 'suffix6.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
# $(LINK) is not defined automatically by Automake, since the *_SOURCES
# Test to make sure Automake supports implicit rules "confusing"
# extensions. Inspired by a mail from Alex Hornby.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUFFIXES = .idl S.cpp C.h
# From PR/37.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
plan_ 10
# Make sure that Automake choose the shorter route between suffixes
# (related to PR/37)
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac << 'END'
AC_PROG_CC
# Reported by Joerg-Martin Schwarz.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# Test to make sure that 'automake -a' redirects dangling symlinks.
-. ./defs || exit 1
+. test-init.sh
rm -f install-sh
ln -s Zardoz install-sh || skip_ "cannot create broken symlinks"
# Test for error for bad syntax.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
foo = q \
# extensions. See automake bug#12372.
required='cc etags'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Test for bug reported by Harlan Stenn: the tags target doesn't work
# when there are only headers in a directory.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
noinst_HEADERS = iguana.h
# TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
# sources) exist.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# François Pinard, and later by Akim Demaille.
required=etags
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# - handling of "ambiguous" TODO and SKIP directives
# See also related test 'tap-todo-skip-together.sh'.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - test results without number get automatically numbered in the
# console progress output
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - missing, unreadable, or not-executable test scripts cause proper
# error reports
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# - even after a "Bail out!" directive, all input is still copied in
# the log file
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# "more modern" behaviour in our awk TAP driver.
am_tap_implementation=shell
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - A "Bail out!" directive causes the driver to ignore the exit
# status of the test script.
-. ./defs || exit 1
+. test-init.sh
tests='exit.test exit127.test sighup.test sigterm.test'
# - A "Bail out!" directive causes the driver to ignore any TAP
# diagnostic message in the rest of the following TAP stream.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - A "Bail out!" directive causes the driver to ignore any TAP
# result or error in the rest of the following TAP stream.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# Basic TAP test protocol support:
# - "Bail out!" magic
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# Note that some of the features checked here are checked in other
# test cases too, usually in a more thorough and detailed way.
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# - colorization of TAP results and diagnostic messages
required='grep-nonprint'
-. ./defs || exit 1
+. test-init.sh
# Escape '[' for grep, below.
red="$esc\[0;31m"
# Auxiliary test to set up common data used by many tests on TAP support.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << END
AC_OUTPUT
# Basic TAP test protocol support:
# - dependencies between test scripts
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
# The tests are *deliberately* listed in inversed order here.
# - option '--diagnostic-string' to customize the string introducing
# TAP diagnostics
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# - diagnostic messages (TAP lines with leading "#")
# - flags '--comments' and '--no-comments' of the TAP test driver
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# Check that an example given in the documentation really works.
# See section "Simple Tests" subsection "Script-based Testsuites".
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# with the Automake test harness".
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
cat > configure.ac <<'END'
AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
required=non-root
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# TAP support:
# - empty diagnostic messages are discarder
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - empty TAP input
# - blank TAP input
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - "escape" TODO and SKIP directives (by escaping the "#" character)
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - "escape" TODO and SKIP directives (by escaping the "#" character)
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - the '--ignore-exit' option causes the TAP test driver to ignore
# exit statuses of the test scripts.
-. ./defs || exit 1
+. test-init.sh
echo TESTS = > Makefile.am
for st in 1 2 77 99; do
# TAP support: some unusual forms for valid TAP input.
# See also related test 'tap-fancy2.sh'.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support: more unusual forms for valid TAP input.
# See also related test 'tap-fancy.sh'.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - which log files get copied in the global log?
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - which global test result derives from different test results
# mixed in a single script?
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - VERBOSE environment variable support
# Keep in sync with 'test-log.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TESTS = pass.test skip.test xfail.test fail.test xpass.test error.test
# - The Automake TAP driver has an option that instruct it to read TAP
# input also from the stderr of the test command, not only its stdout.
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# plan, then the driver reports both "missing plan" and "exited with
# non-zero status" errors.
-. ./defs || exit 1
+. test-init.sh
cat > foo.test <<END
#!/bin/sh
# correct test script(s)
# - "make distcheck" works
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# - interactions with 'check_*' variables
required='cc native'
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# of a "plan with skip" TAP plan
# generally true!
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - literal string "0" as a TODO or SKIP message
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - literal "0" and "0.0" in a test description and a TODO/SKIP message
# at the same time
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - literal strings "0" and "0.0" as the reason of the skip in a "TAP
# plan with skip" (i.e., "1..0 # SKIP ...").
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - the string "0" as a test description
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - don't spuriously recognize negative TAP result numbers, but correctly
# interpret them as test descriptions instead
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - "Bail out!" magic and TAP parse errors are not disabled nor turned
# into simple failures by the definition DISABLE_HARD_ERRORS.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
DISABLE_HARD_ERRORS = yes
# - By default, TAP input is only from the stdout (and not the stderr)
# of the test command.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TEST_LOG_DRIVER_FLAGS = --comments
# - we shouldn't spuriously recognize as TAP result numbers what it
# not, even if it seems pretty close
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - ':test-results:' directives in test scripts' output doesn't
# originate spurious results in the testsuite summary
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - don't spuriously recognize lines that are "almost" TAP lines as
# real TAP lines
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - a "not ok # SKIP" line should count as a failure, for consistency
# with the prove(1) utility.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - TAP result numbers terminated by a non-whitespace "word boundary"
# character are recognized
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - how does TAP result numbers with leading zero fares?
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP result lines whose description is a number.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - out-of-order test results
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# log file
# See also related test 'tap-passthrough.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = $(SHELL)
# - TAP errors are reported in the log file too
# See also related test 'tap-passthrough-exit.sh'.
-. ./defs || exit 1
+. test-init.sh
weirdchars=\''"\$@!&()[]<>#;,:.^?*/'
# TAP support:
# - some corner cases for TAP plan
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# and 'tap-skip-whole-badcount.sh'. More checks about corner-cases
# in TAP plans are performed in 'tap-plan-corner.sh'.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - TAP "SKIP" plans with multiple zeroes, as in "1..00 # SKIP"
# This is consistent with the behaviour of the 'prove' utility.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support: a malformed TAP plan is not recognized. The checks in
# here should be consistent with the behaviour of the 'prove' utility.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - test plan preceding and/or following non-result TAP lines
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - plan line with trailing whitespace is recognized and handled correctly
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - test scripts with the test plan at the beginning
# - test scripts with the test plan at the end
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - interactions between "TAP plan with SKIP" and logging of earlier or
# later TAP or non-TAP text
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - an exit status != 0 of a test script causes an hard error, even if
# the last line of output is a "SKIP plan" (e.g., "1..0 # SKIP").
-. ./defs || exit 1
+. test-init.sh
echo TESTS = one.test two.test > Makefile.am
# - a "Bail out!" directive causes an hard error, even if coming after
# a "SKIP plan" (e.g., "1..0 # SKIP").
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - "SKIP" keyword in a TAP plan is case-insensitive
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - the special "plan with SKIP" can also be used "late" in the TAP
# stream, i.e., preceded by non-TAP output or TAP diagnostic.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - TAP errors following a "TAP plan with SKIP" are still diagnosed.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - test results seen in a TAP stream that has a "plan with SKIP" are
# flagged as errors, even if all of them are "SKIP" results.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# been seen is an error
# - any test result following a "plan with skip" is an error.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - normalization of whitespace in console testsuite progress associated
# with a SKIP directive in the TAP plan
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# Basic TAP test protocol support:
# - special plan format to skip all the tests in a script
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# children, and is pretty hacky and complex; is there a better way to
# accomplish the checks done here?
-. ./defs || exit 1
+. test-init.sh
cat >expect-check <<'END'
eval spawn $env(SHELL) -c ":"
cat > Makefile.am << 'END'
TESTS = all.test
+AM_COLOR_TESTS= no
END
+
. tap-setup.sh
cat > all.test <<'END'
# TAP support:
# - RECHECK_LOGS
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = cat
# Test the 'recheck' target for TAP test protocol.
# Keep in sync with 'test-driver-custom-multitest-recheck.sh'.
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# TAP support:
# - non-directive comments in TAP results are kept verbatim
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - a test script terminated by a signal causes an hard error
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# - a test result numbered as 0 is to be considered out-of-order
# This is consistent with the behaviour of the 'prove' utility.
-. ./defs || exit 1
+. test-init.sh
if test $am_tap_implementation = perl; then
$PERL -MTAP::Parser -e 1 \
# - TODO and SKIP directives on the same line: the first one wins
# See also related test 'tap-ambiguous-directive.sh'.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - normalization of whitespace in console testsuite progress associated
# with TODO and SKIP directives
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# - the reasons for TODO and SKIP, if present, are nicely printed in
# the testsuite progress output
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP support:
# - unplanned tests are properly reported as errors
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# force us to tweak dozens of other tests (hopefully).
# See also related test 'tap-todo-skip-whitespace.sh'.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
TEST_LOG_COMPILER = cat
# - tests without explicit number get automatically numbered in the
# testsuite progress output on console
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# TAP and $(XFAIL_TESTS): test results without directives are turned from
# PASS to XPASS and from FAIL to XFAIL; other results are unchanged.
-. ./defs || exit 1
+. test-init.sh
. tap-setup.sh
# FIXME: currently this works only when the tar format used is 'v7'
# FIXME: (which is the default one).
-. ./defs || exit 1
+. test-init.sh
cwd=$(pwd) || fatal_ "getting current working directory"
# Check the tar-ustar option.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([tar], [1.0])
# Check the tar-pax option.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([tar2], [1.0])
# Check the tar options diagnostics.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << 'END'
AC_INIT([tar2], [1.0])
# Assar Westerlund <assar@sics.se>
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that target clashes are diagnosed.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# parallel-tests:
# - LOG_DRIVER variables can be AC_SUBST'd
-. ./defs || exit 1
+. test-init.sh
mkdir test-drivers
# - Automake can correctly handle conditionals contents for the
# LOG_DRIVER variables.
-. ./defs || exit 1
+. test-init.sh
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
# e.g., 'sub/foo.log'), the Automake test harness must ensure that
# directory exists before calling any custom test driver.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# and 'parallel-tests-recheck-override.sh'.
# Keep in sync with 'tap-recheck.sh'.
-. ./defs || exit 1
+. test-init.sh
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
# See also related tests 'test-driver-custom-multitest-recheck.sh' and
# 'parallel-tests-recheck-override.sh'.
-. ./defs || exit 1
+. test-init.sh
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
# only checks implementation details in Automake's custom test drivers
# support, but also serves as a "usability test" for our APIs.
-. ./defs || exit 1
+. test-init.sh
cp "$am_testauxdir"/trivial-test-driver . \
|| fatal_ "failed to fetch auxiliary script trivial-test-driver"
# installed or referenced if it's not used, i.e., if the user has
# defined his own '*LOG_DRIVER' variables.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Custom test drivers: "abstract" XFAIL_TESTS support.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_SUBST([nihil], [])
# Custom test drivers: per-extension test drivers.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# (like our dummy one in this test) might leave around a test log even
# in case of internal failures.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# defined in a subdir Makefile
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "getting current working directory"
-do_check ()
-{
- whereopts=$1 auxdir=$2
- case $#,$whereopts in
- 2,ac) ac_opts=parallel-tests am_code= ;;
- 2,am) am_opts=parallel-tests ac_code= ;;
- *) fatal_ "do_check: bad usage";;
- esac
- mkdir $whereopts
- cd $whereopts
+for i in 1 2; do
+ mkdir D$i
+ cd D$i
+ if test $i -eq 1; then
+ auxdir=.
+ test_driver=test-driver
+ else
+ auxdir=build-aux
+ test_driver=$auxdir/test-driver
+ mkdir $auxdir
+ fi
mkdir tests
unindent > configure.ac << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([$ac_opts])
+ AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT
END
- if test $auxdir = .; then
- test_driver=test-driver
- else
- mkdir $auxdir
- test_driver=$auxdir/test-driver
- fi
- # No 'AUTOMAKE_OPTIONS' in here -- purposely.
unindent > Makefile.am << END
SUBDIRS = tests
check-local: test-top
.PHONY: test-top
END
unindent > tests/Makefile.am << END
- AUTOMAKE_OPTIONS = $am_opts
check-local: test-sub
test-sub:
echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
$AUTOMAKE
diff Makefile.in Makefile.sav
diff tests/Makefile.in tests/Makefile.sav
- :
-}
-
-do_check ac .
-do_check am build-aux
+ cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'"
+done
:
# Custom test drivers: check that the test name passed to the test
# driver has any VPATH prefix stripped.
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "cannot get current working directory"
# - .test if $(TEST_EXTENSIONS) is not defined
# - stuff in $(TEST_EXTENSIONS) otherwise
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# Expose bug in conditional definition of TEST_EXTENSIONS.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND], [:])
# and do not diagnose valid (albeit more unusual) ones.
# See automake bug#9400.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Check that our concurrent test harness is not subject to spurious VPATH
# rewrites.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - VERBOSE environment variable support
# Keep in sync with 'tap-log.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# different test scripts don't end up sharing the same log file.
# (Automake itself is such a project, BTW ;-)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Custom test drivers and parallel-tests harness: check the documented
+# Custom test drivers and parallel test harness: check the documented
# semantics for deciding when the content of a test log file should be
# copied in the global test-suite.log file. Currently, this is done
# with the use of the reStructuredText field ':copy-in-global-log:' in
# the associated '.trs' files.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# "global test result" in '*.trs' files, as documented in the automake
# manual.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test the "make recheck" semantics for custom test drivers, as documented
# in the Automake manual.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Parallel testsuite harness: check APIs for the registering of test
# results in '*.trs' files, as documented in the automake manual.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - non-existent scripts listed in TESTS get diagnosed
# See also related test 'test-missing2.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# all the $(TEST_LOGS) have a dummy dependency.
# See also related test 'test-missing.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# - creation and removal of '.trs' auxiliary files
# - check some internals regarding the use of '.trs' files.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# This test is complex and tricky, but that's acceptable since we are
# testing semantics that are potentially complex and tricky.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# Check parallel harness features:
# - recovery from unreadable '.trs' files, in various scenarios
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_OUTPUT
# by TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT in LOG_COMPILER and
# LOG_FLAGS (for tests both with and without registered extensions).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# With old serial testsuite driver, TESTS_ENVIRONMENT can be used to
# define the "test runner", i.e. the program that the test scripts must
-# be run by (with the parallel-tests driver one should use LOG_COMPILER
+# be run by (with the parallel test harness one should use LOG_COMPILER
# for this). The behaviour tested here is also documented in the manual.
am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<END
AC_SUBST([PERL], ['$PERL'])
# and the following CC:ed thread on bug-autoconf list:
# <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
am_serial_tests=yes
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Incidentally, this test also checks that the testsuite summary doesn't
# give any bug-report address if it's not defined.
-. ./defs || exit 1
+. test-init.sh
for s in trivial-test-driver extract-testsuite-summary.pl; do
cp "$am_testauxdir/$s" . || fatal_ "failed to fetch auxiliary script $s"
# Check that the global testsuite log file referenced in the testsuite
# summary and in the global testsuite log itself is correct.
-. ./defs || exit 1
+. test-init.sh
mv configure.ac configure.stub
# Make sure that --program-transform works.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# collapsed.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_CC
# stuff (in particular, pgklibdir, pkgdatadir and pkglibexecdir).
required=cc
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac <<'END'
AC_INIT([foo], [1.0])
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# The pdf, ps and dvi targets shouldn't let clutter in the build directory.
-# Related to automake bug#11146.
+# The info, html, pdf, ps and dvi targets shouldn't let clutter in the
+# build directory. Related to automake bug#11146.
-required='makeinfo tex texi2dvi-o dvips'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi dvips'
+. test-init.sh
-mkdir sub
-
-echo AC_OUTPUT >> configure.ac
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-all-local: ps pdf dvi html
-info_TEXINFOS = foo.texi sub/bar.texi
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = foo.texi doc/bar.texi baz.texi
+SUBDIRS = sub
+END
+
+mkdir sub doc
+
+cat > sub/Makefile.am << 'END'
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = baz.texi
END
cat > foo.texi << 'END'
@bye
END
-cat > sub/bar.texi << 'END'
+cat > doc/bar.texi << 'END'
\input texinfo
@setfilename bar.info
@settitle bar
\input texinfo
@setfilename baz.info
@settitle baz
-@node Top
-Hello walls.
-@bye
-END
-
-cat > baz.texi << 'END'
-\input texinfo
-@setfilename baz.info
-@settitle baz
@defindex au
@defindex sa
@defindex sb
@bye
END
+cp baz.texi sub
+
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
# clean up potential cruft left by earlier ones.
for fmt in info pdf ps dvi html all; do
$MAKE $fmt
- ls -l . sub # For debugging.
- ls -d foo* baz* sub/bar* > lst
- $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && exit 1
- $MAKE clean
+ # For debugging.
+ ls -l . doc sub
+ # Sanity check.
+ case $fmt in
+ html)
+ test -e foo.html
+ test -e doc/bar.html
+ test -e baz.html
+ test -e sub/baz.html
+ ;;
+ all)
+ for x in info pdf ps dvi; do
+ test -f foo.$x
+ test -f doc/bar.$x
+ test -f baz.$x
+ test -f sub/baz.$x
+ done
+ test -e foo.html
+ test -e doc/bar.html
+ test -e baz.html
+ test -e sub/baz.html
+ ;;
+ *)
+ test -f foo.$fmt
+ test -f doc/bar.$fmt
+ test -f baz.$fmt
+ test -f sub/baz.$fmt
+ ;;
+ esac
+ # Real test.
+ ls -d foo* baz* sub/baz* doc/bar* > lst
+ basename_rx='(foo|doc/bar|baz|sub/baz)'
+ case $fmt in
+ pdf) extension_rx="(texi|pdf|t2p)";;
+ dvi) extension_rx="(texi|dvi|t2d)";;
+ ps) extension_rx="(texi|ps|dvi|t2d)";;
+ info) extension_rx="(texi|info)";;
+ html) extension_rx="(texi|html)";;
+ all) extension_rx="(texi|html|info|pdf|ps|dvi|t2[pd])";;
+ *) fatal_ "unreachable code reached";;
+ esac
+ $EGREP -v "^$basename_rx\.$extension_rx$" lst && exit 1
+ # Cleanup for checks on the next format.
+ case $fmt in
+ info) rm -f *.info doc/*.info sub/*.info;;
+ *) $MAKE clean;;
+ esac
done
$MAKE distcheck
# Test that automake complains properly when the files with unrecognized
# extensions are passed to the TEXINFOS primary.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
# Jim Meyering.
required=makeinfo
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_OUTPUT
# Make sure dvi target recurses into subdir.
# Reported by Pavel Roskin.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
SUBDIRS = sub
# Also make sure we do not distribute too much foo.info* files (Report
# from Vincent Lefevre).
-required='makeinfo tex texi2dvi-o'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# not in $(builddir).
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Make sure Automake uses the _first_ @setfilname it sees.
# Report from Karl Berry.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = texinfo.texi
# Test support for DJGPP's .iNN info files.
required=makeinfo
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test to ensure that a ".info~" file doesn't end up in the
# distribution. Bug report from Greg McGary.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Make sure info files survive makeinfo errors.
required=makeinfo
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test support for building HTML documentation, and the many
# install-DOC flavors.
-required='makeinfo-html tex texi2dvi'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
cat >>configure.ac <<\EOF
AC_CONFIG_FILES([rec/Makefile])
EOF
cat > Makefile.am << 'END'
+check-local: ps pdf dvi html # For "make distcheck".
SUBDIRS = rec
info_TEXINFOS = main.texi sub/main2.texi
END
:> "$(pdfdir)/hello"
uninstall-local:
rm -f "$(pdfdir)/hello"
+
+check-local: ps pdf dvi html # For "make distcheck".
END
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure
+./configure --prefix "$(pwd)"
$MAKE
test ! -e rec/main3.html
# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
+
+cp Makefile.am Makefile.sav
cat >>Makefile.am <<\EOF
AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
AM_MAKEINFOFLAGS = --unsupported-option
EOF
$AUTOMAKE
-./configure --prefix "$(pwd)"
+./config.status Makefile
$MAKE html
test -f main.html
test -f sub/main2.html
test -d rec/main3.html
+
$MAKE clean
test ! -e main.html
test ! -e sub/main2.html
test ! -e share/$me/pdf/main3.pdf
test ! -e share/$me/pdf/hello
+# Restore the makefile without a broken AM_MAKEINFOFLAGS definition.
+mv -f Makefile.sav Makefile.am
+$AUTOMAKE
+./config.status Makefile
+
+$MAKE distcheck
+
:
# Report from Tom Tromey.
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# (Similar to txinfo13.sh, plus DISTCLEANFILES).
# (See also txinfo24.sh and txinfo25.sh).
-required='makeinfo tex texi2dvi-o'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# (Similar to txinfo16.sh, plus CLEANFILES).
# (See also txinfo23.sh and txinfo25.sh).
-required='makeinfo tex texi2dvi-o'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# (Similar to txinfo16.sh, plus CLEANFILES).
# (See also txinfo23.sh and txinfo24.sh).
-required='makeinfo tex texi2dvi-o'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# PR/408
required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Make sure install-info works even if no-installinfo is given.
required='makeinfo'
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# references.
# Report from Ralf Corsepius.
-required='makeinfo tex texi2dvi-o'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
# This setting, when honored by GNU ls, used to cause an infinite loop
# in mdate-sh.
# Make sure that INFO_DEPS can be overridden.
# Report from Bruce Korb.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
INFO_DEPS = foo.info
# Test to make sure .info-less @setfilename works.
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2005-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure 'missing texinfo' does not create empty files.
-# Report from Bob Proulx.
-
-. ./defs || exit 1
-
-echo info_TEXINFOS = bar.texi >Makefile.am
-echo grepme >bar.info
-$sleep
-cat >bar.texi <<EOF
-@setfilename bar.info
-EOF
-
-echo AC_OUTPUT >>configure.ac
-
-cat >makeinfo <<\EOF
-#!/bin/sh
-# This script
-# 1. fails so 'missing' can take over
-# 2. does not understand '--version' so 'missing' thinks 'makeinfo' isn't
-# installed
-exec false
-EOF
-
-chmod +x makeinfo
-
-PATH=$(pwd)$PATH_SEPARATOR$PATH
-export PATH
-
-# Otherwise configure might pick up a working makeinfo from the
-# environment. Seen in automake bug#10866.
-unset MAKEINFO || :
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE
-grep grepme bar.info
-test -f bar.info
-
-# We should not create a missing bar.info.
-rm -f bar.info
-$MAKE && exit 1
-test ! -e bar.info
-
-:
# Make sure file extensions are matched correctly.
# Report from Eric Dorland.
-. ./defs || exit 1
+. test-init.sh
echo info_TEXINFOS = bar.texi >Makefile.am
cat >bar.texi <<EOF
# Make sure the documentation targets work as required with BSD make,
# even in the presence of subdirs (requires presence of default *-am rules).
-. ./defs || exit 1
+. test-init.sh
mkdir sub
cat >>configure.ac <<'END'
# DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
# Similar to txinfo25.sh.
-required='makeinfo tex texi2dvi-o dvips'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi dvips'
+. test-init.sh
mkdir sub
# Make sure non-empty, non-info suffixes are diagnosed.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 1998-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# Also check that TEXINFOS + cygnus work without requiring the
-# '-Wno-override' option.
-# See also sister test txinfo5b.sh.
-# Report from Ian Taylor.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 1998-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# See also sister test txinfo5.sh.
-# Report from Ian Taylor.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-# Disable 'override' warnings to work around an unrelated
-# texi+cygnus bug.
-# Disable obsolete warnings because the 'cygnus' mode is now deprecated.
-AUTOMAKE_OPTIONS = -Wno-override -Wno-obsolete
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-$AUTOMAKE -a --cygnus
-test ! -e texinfo.tex
-
-:
# Test to make sure '.txi' extension works.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = foo.txi
# Test to make sure texinfo.tex correctly installed by -a. Bug report
# by Per Cederqvist.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# -a when we're using AC_CONFIG_AUX_DIR. Bug report by by Per
# Cederqvist.
-. ./defs || exit 1
+. test-init.sh
cat > configure.ac << END
AC_INIT([$me], [1.0])
# Make sure we only create texinfo-related targets once.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = maude.texi liver.txi heart.texinfo
# tests for other primaries too? E.g., SCRIPTS, PROGRAMS, LISP, PYTHON,
# etc...
-. ./defs || exit 1
+. test-init.sh
mkdir d
: > d/f
# need sister tests for other primaries too? E.g., PROGRAMS, LISP,
# PYTHON, etc...
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Test for failing check for unused macros. From Johan Danielsson.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
MACRO_1
# A simple Hello World for UPC.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_PROG_UPC
# Test that Automake suggests using AM_PROG_UPC if Unified Parallel C
# sources are used.
-. ./defs || exit 1
+. test-init.sh
echo AC_PROG_CC >>configure.ac
# Test that C and Unified Parallel C link safely.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure recursive variable definitions die.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
-AM_CONDITIONAL(ONE, true)
-AM_CONDITIONAL(TWO, false)
END
cat > Makefile.am << 'END'
# Test to make sure recursive variable definitions die.
# From Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
man_MANS = chgrp.1
$ACLOCAL
$AUTOMAKE
+
+:
# Test various variable definitions that include an '=' sign.
# From Raja R Harinath.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
MY_FLAGS_1=-DABC=345
# Check that Automake warns about variables containing spaces
# and other non-POSIX characters.
-. ./defs || exit 1
+. test-init.sh
cat >Makefile.am <<'EOF'
L01 = $(shell echo *)
# Targets and macros are two different name spaces.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
install = install
# Libtool variant.
required=libtoolize
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AM_PROG_AR
# Make sure we warn about possible variable typos when we should.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'END'
AC_PROG_RANLIB
# Test to make sure version in AUTOMAKE_OPTIONS works.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 9.9x
# Test to make sure we are compatible with the 1.4-p1 series.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = 1.4-p3
# Make sure the current version can be required.
-. ./defs || exit 1
+. test-init.sh
amver=$($AUTOMAKE --version | sed -e 's/.* //;1q')
# changes -- we don't support this feature on non-GNU Makes).
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
m4_include([version.m4])
# Calling AM_AUTOMAKE_VERSION by hand is a bug.
-. ./defs || exit 1
+. test-init.sh
echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.ac
$ACLOCAL 2>stderr && { cat stderr >&2; exit 0; }
# Test to make sure VPATH can be overridden.
# Report from Anthony Green.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
VPATH = zardoz
# Basic checks and some regressions testing on 'version.texi'
# support for texinfo files.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi
# version.texi gets listed as a dependency for the .info file but
# not the .dvi file.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
info_TEXINFOS = zardoz.texi
# See also the related test 'vtexi4.sh', which does similar checks, but
# for version.texi only, and requires makeinfo, tex and texi2dvi.
-. ./defs || exit 1
+. test-init.sh
# We are going to override package version in AC_INIT, so we need
# to redefine the name of the distdir as well.
# for more vers*.texi files, and does not require makeinfo, tex and
# texi2dvi.
-required='makeinfo tex texi2dvi-o grep-nonprint'
-. ./defs || exit 1
+required='makeinfo tex texi2dvi grep-nonprint'
+. test-init.sh
test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
&& day=$(LC_ALL=C date '+%d') && test -n "$day" \
# levels are "catch-all warnings" (such as '-Wall' and '-Wnone').
# Since we are at it, also throw in *.am and *.m4 file inclusions.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Check that automake warnings in the 'obsolete' category are enabled
# by default.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# been in place for quite a long time); see also Automake bug #7673.
# Update this test if the semantics are changed.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# warnings specified later should take precedence over those specified
# earlier.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# in AUTOMAKE_OPTIONS take precedence over explicit warnings given in
# AM_INIT_AUTOMAKE.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE -Werror"
# Check that automake complains about unknown warnings.
-. ./defs || exit 1
+. test-init.sh
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
# Check that, on the command line, explicitly-defined warnings take
# precedence over implicit strictness-implied warnings.
-. ./defs || exit 1
+. test-init.sh
# We want complete control over automake options.
AUTOMAKE=$am_original_AUTOMAKE
# Make sure that we can enable or disable warnings on a per-file basis.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
# Test to make sure -Werror and --add-missing work together.
-. ./defs || exit 1
+. test-init.sh
: > Makefile.am
# succeed if make is run a second time immediately afterwards.
# Report from Harlan Stenn.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT>>configure.ac
# Make sure a per-Makefile.am -Werror setting is not carried over
# to another Makefile.am.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<\END
AC_CONFIG_FILES([sub/Makefile])
# -Werror and local -Werror settings should be flagged for the user.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<\END
AC_CONFIG_FILES([sub/Makefile])
# from Johan Danielsson (and a very nice bug report, too, I might
# add).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
WHO_AM_I=17
# Test to make sure multiple source files with the same object
# file causes error.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
# Test to make sure ylwrap is put in right location.
# Report from Tim Van Holder.
-. ./defs || exit 1
+. test-init.sh
mkdir aux1 sub
# Keep in sync with sister test 'yacc-cxx.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# For Automake bug#7648 and PR automake/491.
required='c++ bison'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# For Automake bug#7648 and PR automake/491.
required='cc bison'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'yacc-clean.sh'.
required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# See also sister test 'yacc-cxx-clean.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep in sync with sister test 'yacc-basic.sh'.
required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Keep in sync with sister test 'yacc-d-cxx.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep in sync with sister test 'yacc-d-basic.sh'.
required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
write_parse ()
{
# Please keep this in sync with sister test 'yaccvpath.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Tests that we can recover from deleted headers generated by 'yacc -d'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Report from Paolo Bonzini.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# with NetBSD make).
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Exposes automake bug#8485.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
# This test is bounded to fail for any implementation that
# triggers automake bug#7884.
# See automake bug#7884.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# if (AM_)?YFLAGS do not contain '-d'.
# Requested by Jim Meyering.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test of yacc functionality, derived from GNU binutils
# by Tim Van Holder.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# PR/47.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# See also sister test 'lex-line.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
# in the same directory.
required='cc c++ yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# for lex-generated .c files.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# for lex-generated C files.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'EOF'
AM_MAINTAINER_MODE
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Check that yacc sources with many dots in their name are handled
# correctly.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Some simple tests of ylwrap functionality.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Removal recovery rules for headers should not remove files with 'make -n'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# which does much more in-depth checks (but requires an actual
# Yacc program and a working C++ compiler).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Please keep this in sync with sister test 'yacc-d-vpath.sh'.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# at configure time and/or at make time.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
unset YFLAGS || :
# Check that automake complains about *_YFLAGS variables which have
# conditional content.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Check for false positives in automake recognition of '-d' in YFLAGS.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Check that the user can force automake to use *_YFLAGS variables
# which have conditional content.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_SUBST([CC], [false])
# variable is user-reserved).
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# foo_flags = -d
# AM_YFLAGS = $(foo_flags)
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# Please keep this in sync with the sister tests yflags2.sh, lflags.sh
# and lflags2.sh.
-. ./defs || exit 1
+. test-init.sh
cat >fake-yacc <<'END'
#!/bin/sh
# Please keep this in sync with the sister tests yflags.sh, lflags.sh
# and lflags2.sh.
-. ./defs || exit 1
+. test-init.sh
cat >fake-yacc <<'END'
#!/bin/sh