diff options
author | Tom Tromey <tromey@redhat.com> | 1997-09-24 22:32:56 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 1997-09-24 22:32:56 +0000 |
commit | 0e74013cebd849234ee1488a468ca434382daa54 (patch) | |
tree | cfe8836a116f217db26d18afb8d87096b101ef0a | |
parent | 5cba59db1cb65c5ebb4d710c570cb32d707948e3 (diff) | |
download | automake-0e74013cebd849234ee1488a468ca434382daa54.tar.gz |
better error message when AC_OUTPUT arg empty
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | automake.in | 17 | ||||
-rw-r--r-- | tests/ChangeLog | 2 | ||||
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/Makefile.in | 2 | ||||
-rwxr-xr-x | tests/output5.test | 19 |
6 files changed, 41 insertions, 4 deletions
@@ -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 |