+Sat Sep 21 13:59:15 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (am_install_var): More error checking.
+
Fri Sep 20 09:06:37 1996 Tom Tromey <tromey@creche.cygnus.com>
* tags.am (TAGS): Minor cleanup.
# for Gnitsoids.
local (%valid) = &am_primary_prefixes ($primary, @prefixes);
+ # If a primary includes a configure substitution, then the EXTRA_
+ # form is required. Otherwise we can't properly do our job.
+ local ($require_extra);
+ local ($warned_about_extra) = 0;
+
local ($clean_file) = $file . '-clean';
local ($one_name);
local ($X);
foreach $rcurs (&variable_value_as_list ($one_name))
{
# Skip configure substitutions. Possibly bogus.
- next if $rcurs =~ /^\@.*\@$/;
+ if ($rcurs =~ /^\@.*\@$/)
+ {
+ if ($X eq 'EXTRA')
+ {
+ if (! $warned_about_extra)
+ {
+ $warned_about_extra = 1;
+ &am_line_error ($one_name,
+ "\`$one_name' contains configure substitution, but shouldn't");
+ }
+ }
+ else
+ {
+ $require_extra = $one_name;
+ }
+ next;
+ }
push (@result, $rcurs);
}
$output_vars .= "\n";
}
+ if ($require_extra && ! &variable_defined ('EXTRA_' . $primary))
+ {
+ &am_line_error ($require_extra,
+ "\`$require_extra' contains configure substitution, but \`EXTRA_$primary' not defined");
+ }
+
# Push here because PRIMARY might be configure time determined.
push (@all, '$(' . $primary . ')')
if $do_all && @used;
@node General Operation
@section General Operation
-Automake essentially works by reading a @file{Makefile.am} and
-generating a @file{Makefile.in}.
+Automake works by reading a @file{Makefile.am} and generating a
+@file{Makefile.in}. Certain macros and targets defined in the
+@file{Makefile.am} instruct automake to generate more specialized code;
+for instances a @samp{bin_PROGRAMS} macro definition will cause targets
+for compiling and linking to be generated.
The macro definitions and targets in the @file{Makefile.am} are copied
-into the generated file. This allows you to add essentially arbitrary
-code into the generated @file{Makefile.in}. For instance the Automake
-distribution includes a non-standard @code{cvs-dist} target, which the
-Automake maintainer uses to make distributions from his source control
-system.
+into the generated file. This allows you to add arbitrary code into the
+generated @file{Makefile.in}. For instance the Automake distribution
+includes a non-standard @code{cvs-dist} target, which the Automake
+maintainer uses to make distributions from his source control system.
Note that GNU make extensions are not recognized by Automake. Using
such extensions in a @file{Makefile.am} will lead to errors or confusing
+Sat Sep 21 14:01:10 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * primary2.test: New file.
+ * primary.test: New file.
+
Fri Sep 20 09:39:27 1996 Tom Tromey <tromey@creche.cygnus.com>
* confsub.test: New file.
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
-confsub.test
+confsub.test primary.test primary2.test
EXTRA_DIST = defs $(TESTS)
exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
order.test libobj2.test interp.test alllib.test block.test libobj3.test \
gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
-confsub.test
+confsub.test primary.test primary2.test
EXTRA_DIST = defs $(TESTS)
mkinstalldirs = $(top_srcdir)/mkinstalldirs
--- /dev/null
+#! /bin/sh
+
+# Test to make sure errors in am_install_var work.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = @programs@
+END
+
+$AUTOMAKE && exit 1
+exit 0
--- /dev/null
+#! /bin/sh
+
+# Test to make sure errors in am_install_var work.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = @programs@
+EXTRA_PROGRAMS = joe @more@
+END
+
+$AUTOMAKE && exit 1
+exit 0
-@set UPDATED 20 September 1996
+@set UPDATED 21 September 1996
@set EDITION 1.1f
@set VERSION 1.1f