]> sourceware.org Git - automake.git/commitdiff
added --generate-deps from paul d smith
authorTom Tromey <tromey@redhat.com>
Fri, 13 Feb 1998 05:19:33 +0000 (05:19 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 13 Feb 1998 05:19:33 +0000 (05:19 +0000)
ChangeLog
automake.in
automake.texi

index 16ed5cddcc888e9c0c6149b58096a1651d4b12e3..2cf34d7c186611480ed1c2c13690d4118f8eb1a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index d7b06ce5ab11caa6badfd80cfdf2bd5d2e6958ce..2f1b8d3a81c186294187911be923ddd516ed74f7 100755 (executable)
@@ -83,6 +83,10 @@ $default_strictness_name = 'gnu';
 # 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;
 
@@ -280,6 +284,27 @@ $obsolete_rx = '(' . join ('|', keys %obsolete_macros) . ')';
 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)
 {
@@ -382,6 +407,10 @@ sub parse_arguments
        {
            $cmdline_use_dependencies = 0;
        }
+       elsif ($arglist[0] eq '--generate-deps')
+       {
+           $generate_deps = $1;
+       }
        elsif ($arglist[0] eq '--no-force')
        {
            $force_generation = 0;
@@ -1179,7 +1208,7 @@ sub handle_single_transform_list
            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
index 47a5cc3b8b01bbf930cb38c97a03cefcd1b177e0..f5f0d12e1c373a1455cbdeb5fa2b32e077d324ca 100644 (file)
@@ -741,6 +741,16 @@ Include all automatically generated dependency information
 @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
This page took 0.053297 seconds and 5 git commands to generate.