before parsing the options.
* automake.in (configure_ac): Likewise.
* lib/Automake/Variable.pm (configure_ac): Do not require configure.ac,
find it.
* lib/Automake/Configure_ac.pm (require_configure_ac):
find_configure_ac never return an undefined value, so test
the file's existence instead.
* tests/Makefile.am (TESTS): Add help.test.
* tests/help.test: New file.
+2003-09-07 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * aclocal.in (configure_ac): Do not call require_configure_ac
+ before parsing the options.
+ * automake.in (configure_ac): Likewise.
+ * lib/Automake/Variable.pm (configure_ac): Do not require configure.ac,
+ find it.
+ * lib/Automake/Configure_ac.pm (require_configure_ac):
+ find_configure_ac never return an undefined value, so test
+ the file's existence instead.
+ * tests/Makefile.am (TESTS): Add help.test.
+ * tests/help.test: New file.
+
2003-09-06 Alexandre Duret-Lutz <adl@gnu.org>
* lib/Automake/XFile.pm: Update to use ChannelDefs.
# Some globals.
# configure.ac or configure.in.
-my $configure_ac = require_configure_ac;
+my $configure_ac;
# Output file name.
$output_file = 'aclocal.m4';
\f
local (@dirlist) = &parse_arguments (@ARGV);
+$configure_ac = require_configure_ac;
&scan_m4_files (@dirlist);
&scan_configure;
if (! $exit_code)
## ---------------------------------------- ##
# Name of the configure.ac file.
-my $configure_ac = require_configure_ac;
+my $configure_ac;
# Files found by scanning configure.ac for LIBOBJS.
my %libsources = ();
# Parse command line.
parse_arguments;
+$configure_ac = require_configure_ac;
+
# Do configure.ac scan only once.
scan_autoconf_files;
{
my $res = find_configure_ac (@_);
fatal "`configure.ac' or `configure.in' is required"
- unless defined $res;
+ unless -f $res;
return $res
}
);
# The name of the configure.ac file.
-my $configure_ac = require_configure_ac;
+my $configure_ac = find_configure_ac;
# Variables that can be overriden without complaint from -Woverride
my %_silent_variable_override =
gnits2.test \
gnits3.test \
header.test \
+help.test \
implicit.test \
include.test \
include2.test \
gnits2.test \
gnits3.test \
header.test \
+help.test \
implicit.test \
include.test \
include2.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2003 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure --help and --version work, even when no configure.ac
+# is in the current directory.
+
+. ./defs || exit 1
+
+set -e
+
+# Ensure we are run from the right directory.
+# (The last thing we want is to delete some random user files.)
+test -f ../defs
+rm -f *
+
+$ACLOCAL --version
+$ACLOCAL --help
+$AUTOMAKE --version
+$AUTOMAKE --help
+
+# aclocal and automake cannot work without configure.ac or configure.in
+$ACLOCAL 2>stderr && exit 1
+grep configure.ac stderr
+grep configure.in stderr
+AUTOMAKE_fails
+grep configure.ac stderr
+grep configure.in stderr