+Tue Sep 16 14:13:15 1997 Paul D. Smith <psmith@baynetworks.com>
+
+ * automake.in: Create new option --generate-deps. This option has
+ automake generate a .dep_segment file containing just the
+ dependencies created from the .P list. This is needed to maintain
+ other makefiles that automake doesn't deal with (Makefile.DOS,
+ SMakefile, etc.)
+ * automake.texi (Invoking Automake): Document it.
+
Thu Feb 12 19:45:16 1998 Tom Tromey <tromey@cygnus.com>
* aclocal.in (scan_configure): Tightened regexp a bit. Test
# code should be included in generated Makefile.in.
$cmdline_use_dependencies = 1;
+# This is the name of a dependency makefile bit (usually for inclusion in a
+# SMakefile or similar); empty if not set.
+$generate_deps = '';
+
# TRUE if in verbose mode.
$verbose = 0;
die "automake: no \`Makefile.am' found or specified\n"
if ! @input_files;
+# If --generate-deps was given, we don't do anything else
+#
+if ($generate_deps)
+{
+ die "automake: Must specify --include-deps (or -i) when generating\n"
+ if ($use_dependencies);
+ die "automake: Must provide --build-dir when generating\n"
+ if (!$build_directory);
+ die "automake: Must provide --srcdir-name when generating\n"
+ if (!$srcdir_name);
+
+ open(GDEP, ">$output_directory/.dep_segment")
+ || die "automake: Could not open `$output_directory/.dep_segment': $!\n";
+
+ &handle_dependencies;
+ print GDEP $output_rules;
+
+ close(GDEP);
+ exit $exit_status;
+}
+
# Now do all the work on each file.
foreach $am_file (@input_files)
{
{
$cmdline_use_dependencies = 0;
}
+ elsif ($arglist[0] eq '--generate-deps')
+ {
+ $generate_deps = $1;
+ }
elsif ($arglist[0] eq '--no-force')
{
$force_generation = 0;
elsif (s/\.[cly]$//)
{
# .c is C. .l is lex. .y is yacc.
-
+
# Note: first we rewrite (eg) foo.c to foo and push
# the file onto the list of deansified files. Then we add
# $obj, which can either be `_.o', or simply `.o' if
@file{Makefile.in}. This is generally done when making a distribution;
see @ref{Dist}.
+@item --generate-deps
+Generate a file concatenating all automatically generated dependency
+information (@pxref{Dependencies}) into one file, @file{.dep_segment}.
+This is generally done when making a distribution; see @ref{Dist}. It
+is useful when maintaining a @file{SMakefile} or makefiles for other
+platforms (@file{Makefile.DOS}, etc.) It can only be used in
+conjunction with @code{--include-deps}, @code{--srcdir-name}, and
+@code{--build-dir}. Note that if this option is given, no other
+processing is done.
+
@item --no-force
Ordinarily @code{automake} creates all @file{Makefile.in}s mentioned in
@file{configure.in}. This option causes it to only update those