summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1997-09-24 22:32:56 +0000
committerTom Tromey <tromey@redhat.com>1997-09-24 22:32:56 +0000
commit0e74013cebd849234ee1488a468ca434382daa54 (patch)
treecfe8836a116f217db26d18afb8d87096b101ef0a
parent5cba59db1cb65c5ebb4d710c570cb32d707948e3 (diff)
downloadautomake-0e74013cebd849234ee1488a468ca434382daa54.tar.gz
better error message when AC_OUTPUT arg empty
-rw-r--r--ChangeLog3
-rwxr-xr-xautomake.in17
-rw-r--r--tests/ChangeLog2
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/Makefile.in2
-rwxr-xr-xtests/output5.test19
6 files changed, 41 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cf601f621..45c97dac1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
Wed Sep 24 16:10:37 1997 Tom Tromey <tromey@cygnus.com>
+ * automake.in (scan_one_configure_file): Detect AC_OUTPUT().
+ (handle_single_transform_list): Don't apply length() to a list.
+
* automake.in (handle_programs): Define _DEPENDENCIES variable if
not defined by user.
diff --git a/automake.in b/automake.in
index 0a86dc17e..ff6878727 100755
--- a/automake.in
+++ b/automake.in
@@ -1066,7 +1066,7 @@ sub handle_single_transform_list
local (@result) = ();
local ($nonansi_obj) = $obj;
$nonansi_obj =~ s/_//g;
- if (length (@files))
+ if (@files > 0)
{
# Turn sources into objects.
foreach (@files)
@@ -3912,7 +3912,12 @@ sub scan_one_configure_file
}
if ($in_ac_output)
{
- $in_ac_output = 0 if s/[\]\),].*$//;
+ local ($closing) = 0;
+ if (s/[\]\),].*$//)
+ {
+ $in_ac_output = 0;
+ $closing = 1;
+ }
# Look at potential Makefile.am's.
foreach (split)
@@ -3946,6 +3951,14 @@ sub scan_one_configure_file
push (@other_input_files, $_);
}
}
+
+ if ($closing)
+ {
+ &am_conf_line_error ($filename, $ac_output_line,
+ "No files mentioned in \`AC_OUTPUT'")
+ if @make_input_list == 0 && @other_input_files == 0;
+ exit 1;
+ }
}
if (/$AC_CONFIG_AUX_DIR_PATTERN/o)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 5580caeb3..fa5264218 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,7 @@
Wed Sep 24 16:01:59 1997 Tom Tromey <tromey@cygnus.com>
+ * output5.test: New file.
+
* depend3.test: New file.
Mon Aug 25 17:24:42 1997 Tom Tromey <tromey@cygnus.com>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 100ea1dfc..fde902132 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,7 +26,7 @@ remake2.test output3.test output4.test colneq2.test subst.test \
defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
ldadd.test version2.test conf2.test cond.test cond2.test xsource.test \
-libobj6.test depend3.test
+libobj6.test depend3.test output5.test
EXTRA_DIST = defs $(TESTS)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 0e08fc4c8..10911b54e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -87,7 +87,7 @@ remake2.test output3.test output4.test colneq2.test subst.test \
defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \
ldadd.test version2.test conf2.test cond.test cond2.test xsource.test \
-libobj6.test depend3.test
+libobj6.test depend3.test output5.test
EXTRA_DIST = defs $(TESTS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/tests/output5.test b/tests/output5.test
new file mode 100755
index 000000000..8bfd99f0a
--- /dev/null
+++ b/tests/output5.test
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+# Test for AC_OUTPUT(). From Mark Galassi.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+AC_OUTPUT()
+END
+
+: > Makefile.am
+
+$AUTOMAKE > output 2>&1 && exit 1
+grep 'found or specified' output && exit 1
+exit 0