automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01-factor-all.patch


From: Akim Demaille
Subject: 01-factor-all.patch
Date: Sun, 04 Mar 2001 22:12:48 +0100

This one was tricky as @all was used all over the place.  Hence the
size, sorry :(

There is one big twofold change introduced by this change.  First
all-redirect no longer exists.  In fact I don't even understand why it
existed, all you had was

am: all-redirect

and all-redirect had all the magic wrt dependencies, and
all-am/all-recursive.  Well, just move this into all itself, and
you're done.

The second side of the change is that now, all the `all' target are
this former all-redirect, included when there is no `config.h'.  It is
my understanding that to be sure that Makefiles are properly rebuilt,
we really need to have an action (not a dependency) that runs
all-am/recursive.  The good point is that now, independently from the
GNUism of Make, remaking Makefiles is properly handled.  The bad point
is that we are forking many more makes than before.

If this is a problem, then I'd suggest anyway to apply my patch, and
_then_ to get rid of the action part of `all': I think the code is
saner after the patch was apply, and it will be easy to get rid of the
maybe undesired second make.

My patch also makes clear the distinction between the dependencies of
`all', and the dependencies of `all' :)

I meant, `Makefile' must be done before `all', but not `$(DATA)',
which is now a dependency of all-am, not `all'.  There was no such
distinction before, but for `config.h' (one way to paraphrase the
paragraph above is to say that now `Makefile' and `config.h' have the
same status wrt `all').  I was very unsure of the status of
$(BUILT_SOURCES) and made it config.h-like, while $(DATA)-like was
another valid choice.

I need your insight wrt this, Tom.

I didn't bother checking whether BUILT_SOURCES was defined or not,
there is nothing wrong with empty macros, and plenty of good in code
simplification.  See what I mean for instance in the diffs of
tests/Makefile.in.

And now for something completely different: any reason not to include
-w on the #! line instead of the maintainer-check target?


Index: ChangeLog
from  Akim Demaille  <address@hidden>
        Standardize the handing of `all' targets.

        * automake.in (@all): Remove.
        (%dependencies): Add `all' and `all-am'.
        (&handle_hooks): Eve out from...
        (&handle_factored_dependencies): here.
        (&handle_merge_targets): Remove.
        (&handle_all): New, handling the `all' part of former
        &handle_merge_targets.
        (&check_typos): Be sure the user does not play with PRE_INSTALL,
        POST_INSTALL, NORMAL_INSTALL, which former &handle_merge_targets did.
        (&generate_makefile): Adjust.
        Handle the interaction between PROGRAMS and Libtool.
        (&handle_texinfo, handle_man_pages): Don't special case the
        dependencies on `all' targets, let your file.am handle it.
        (&handle_factored_dependencies): `all' is special, and not to be
        processed by you.
        * mans-vars.am: New that &handle_factored_dependencies uniq'es teh
        dependencies, move non var content into...
        * mans.am: here
        * configure.am, data.am, java.am, lisp.am, mans.am, remake-hdr.am,
        * scripts.am, texinfos.am: Set the dependencies of `all' and
        `all-am'.
        * all.am: New.

Index: Makefile.am
--- Makefile.am Wed, 28 Feb 2001 23:04:21 +0100 akim (am/f/46_Makefile.a 1.12 
644)
+++ Makefile.am Sun, 04 Mar 2001 15:08:50 +0100 akim (am/f/46_Makefile.a 1.12 
644)
@@ -10,7 +10,7 @@
 bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi

-amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
+amfiles = all.am check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
 compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \
 distdir.am footer.am header-vars.am header.am install.am \
 java-clean.am java.am kr-extra.am library.am libs-clean.am libs.am \
Index: Makefile.in
--- Makefile.in Fri, 02 Mar 2001 00:21:13 +0100 akim (am/h/16_Makefile.i 1.33 
644)
+++ Makefile.in Sun, 04 Mar 2001 15:16:21 +0100 akim (am/h/16_Makefile.i 1.33 
644)
@@ -84,7 +84,7 @@
 bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi

-amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
+amfiles = all.am check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
 compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \
 distdir.am footer.am header-vars.am header.am install.am \
 java-clean.am java.am kr-extra.am library.am libs-clean.am libs.am \
@@ -137,7 +137,8 @@
 stamp-vti texinfo.tex version.texi ylwrap

 DIST_SUBDIRS = $(SUBDIRS)
-all: all-recursive
+all: $(BUILT_SOURCES) Makefile
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
 .SUFFIXES:
 .SUFFIXES: .dvi .info .ps .texi .texinfo .txi

@@ -477,7 +478,6 @@
          sed 'h;s/./=/g;p;x;p;x'
 check-am: all-am
 check: check-recursive
-all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)

 installdirs: installdirs-recursive
 installdirs-am:
@@ -509,6 +509,8 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
+all-am: $(DATA) $(INFO_DEPS) $(SCRIPTS)
+
 clean: clean-recursive

 clean-am: clean-generic mostlyclean-am
Index: automake.in
--- automake.in Sun, 04 Mar 2001 11:28:37 +0100 akim (am/f/39_automake.i 1.108 
755)
+++ automake.in Sun, 04 Mar 2001 15:16:11 +0100 akim (am/f/39_automake.i 1.108 
755)
@@ -394,6 +394,7 @@
 my %required_targets =
   (
    'all'          => 1,
+   'all-am'       => 1,
    'dvi'         => 1,
    'info'        => 1,
    'install-info' => 1,
@@ -492,7 +493,6 @@
 my %dist_dirs;

 # List of dependencies for the obvious targets.
-my @all;
 my @check;
 my @check_tests;

@@ -688,7 +688,6 @@ sub initialize_per_input ()
     %dist_dirs = ();

     # List of dependencies for the obvious targets.
-    @all = ();
     @check = ();
     @check_tests = ();

@@ -699,6 +698,10 @@ sub initialize_per_input ()
     # in Makefile: keeping related stuff altogether.
     %dependencies =
       (
+       # Alling.
+       'all'            => [],
+       'all-am'         => [],
+
        # Texinfoing.
        'dvi'      => [],
        'dvi-am'   => [],
@@ -1122,6 +1125,7 @@ sub generate_makefile
     &check_gnits_standards;

     &handle_configure ($output, $makefile, @secondary_inputs);
+    &handle_hooks;
     &handle_gettext;
     &handle_libraries;
     &handle_ltlibraries;
@@ -1155,9 +1159,18 @@ sub generate_makefile
     &handle_dist ($makefile);

     &handle_footer;
-    &handle_merge_targets ($output);
+    &do_check_merge_target;
+
+    # FIXME: Where should this go to?
+    if (&variable_defined('lib_LTLIBRARIES') &&
+       &variable_defined('bin_PROGRAMS'))
+    {
+       $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
+    }
+
     &handle_installdirs;
     &handle_clean;
+    &handle_all;
     &handle_factored_dependencies;

     &check_typos;
@@ -1419,7 +1432,7 @@ sub get_object_extension
                # built only when necessary.
                &define_configure_variable ('ANSI2KNR');
                # ansi2knr needs to be built before subdirs, so unshift it.
-               unshift (@all, '$(ANSI2KNR)');
+               &depend ('all-am', '$(ANSI2KNR)');
            }
            else
            {
@@ -2589,6 +2602,15 @@ sub check_typos
            }
        }
     }
+
+        # There are a few install-related variables that you should not define.
+    foreach my $var ('PRE_INSTALL', 'POST_INSTALL', 'NORMAL_INSTALL')
+    {
+       if (&variable_defined ($var))
+       {
+           &am_line_error ($var, "\`$var' should not be defined");
+       }
+    }
 }

 # Handle scripts.
@@ -2855,14 +2877,6 @@ sub handle_texinfo
     push (@dist_targets, 'dist-info');
     push (@suffixes, '.texi', '.texinfo', '.txi', '.info', '.dvi', '.ps');

-    if (! defined $options{'no-installinfo'})
-    {
-       # Make sure documentation is made and installed first.  Use
-       # $(INFO_DEPS), not 'info', because otherwise recursive makes
-       # get run twice during "make all".
-       unshift (@all, '$(INFO_DEPS)');
-    }
-
     &define_variable ("INFO_DEPS", join (' ', @info_deps_list));
     &define_variable ("DVIS", join (' ', @dvis_list));
     # This next isn't strictly needed now -- the places that look here
@@ -2936,11 +2950,6 @@ sub handle_man_pages
     &define_variable ("MANS", join (' ', sort keys %vlist));

     $output_vars .= &file_contents ('mans-vars');
-
-    if (! defined $options{'no-installman'})
-    {
-       push (@all, '$(MANS)');
-    }
 }

 # Handle DATA variables.
@@ -3901,92 +3910,14 @@ sub handle_installdirs
        transform ('_am_installdirs' => $am_var_defs{'_am_installdirs'}));
 }

-# There are several targets which need to be merged.  This is because
-# their complete definition is compiled from many parts.  Note that we
-# avoid double colon rules, otherwise we'd use them instead.
-sub handle_merge_targets
+sub handle_all
 {
-    my ($makefile) = @_;
-
-    # There are a few install-related variables that you should not define.
-    foreach my $var ('PRE_INSTALL', 'POST_INSTALL', 'NORMAL_INSTALL')
-    {
-       if (&variable_defined ($var))
-       {
-           &am_line_error ($var, "\`$var' should not be defined");
-       }
-    }
-
-    # Put this at the beginning for the sake of non-GNU makes.  This
-    # is still wrong if these makes can run parallel jobs.  But it is
-    # right enough.
-    unshift (@all, basename ($makefile));
-
-    foreach my $one_name (@config_names)
-    {
-       push (@all, basename ($one_name))
-           if dirname ($one_name) eq $relative_dir;
-    }
-
-    &do_check_merge_target;
-
-    if (@all || &variable_defined ('BUILT_SOURCES'))
-    {
-       my $local_headers = '';
-       $local_headers = '$(BUILT_SOURCES)'
-           if &variable_defined ('BUILT_SOURCES');
-       foreach my $one_name (@config_names)
-       {
-           if (dirname ($one_name) eq $relative_dir)
-           {
-               $local_headers .= ' ' if $local_headers;
-               $local_headers .= basename ($one_name);
-           }
-       }
-       if ($local_headers)
-       {
-           # We need to make sure config.h is built before we
-           # recurse.  We also want to make sure that built sources
-           # are built before any ordinary `all' targets are run.  We
-           # can't do this by changing the order of dependencies to
-           # the "all" because that breaks when using parallel makes.
-           # Instead we handle things explicitly.
-           $output_rules .= ("all-redirect: ${local_headers}"
-                             . "\n\t"
-                             . '$(MAKE) $(AM_MAKEFLAGS) '
-                             . (&variable_defined ('SUBDIRS')
-                                ? 'all-recursive' : 'all-am')
-                             . "\n\n");
-           $all_target = 'all-redirect';
-           &depend ('.PHONY', 'all-redirect');
-       }
-    }
-
-    if (&variable_defined('lib_LTLIBRARIES') &&
-       &variable_defined('bin_PROGRAMS'))
-    {
-       $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
-    }
-
-    # Install `all' hooks.
-    if (&target_defined ("all-local"))
-    {
-      push (@all, "all-local");
-      &depend ('.PHONY', "all-local");
-    }
-
-    &pretty_print_rule ("all-am:", "\t\t", @all);
-
-    # If we aren't using a redirect target then find the
-    # appropriate actual redirect.
-    if ($all_target eq '')
-      {
-       $all_target = (&variable_defined ('SUBDIRS')
-                      ? 'all-recursive' : 'all-am');
-      }
-
-    $output_all = "all: $all_target\n";
-    &depend ('.PHONY', 'all-am', all);
+    $output_all = &file_contents ('all');
+    $output_all .= &pretty_print_internal ("all:", "\t",
+                                          uniq (sort @{$dependencies{all}}));
+    $output_all .= $actions{'all'}
+      if $actions{'all'};
+    $output_all .= "\n";
 }


@@ -4096,10 +4027,10 @@ sub target_cmp
 }


-# &handle_factored_dependencies ()
-# --------------------------------
-# Handle everything related to gathered targets.
-sub handle_factored_dependencies
+# &handle_hooks ()
+# ----------------
+# Install hooks for standards targets.
+sub handle_hooks ()
 {
     # Reject bad hooks.
     foreach my $utarg ('uninstall-data-local', 'uninstall-data-hook',
@@ -4154,7 +4085,14 @@ sub handle_factored_dependencies

     # All the required targets are phony.
     grep { &depend ('.PHONY', $_) } keys %required_targets;
+}
+

+# &handle_factored_dependencies ()
+# --------------------------------
+# Handle everything related to gathered targets.
+sub handle_factored_dependencies ()
+{
     # Actually output gathered targets.
     foreach (sort target_cmp keys %dependencies)
     {
@@ -4163,6 +4101,9 @@ sub handle_factored_dependencies
          unless (@{$dependencies{$_}}
                  || $actions{$_}
                  || $required_targets{$_});
+       # `all' is special: must be output first.
+       next
+         if /^all$/;
         &pretty_print_rule ("$_:", "\t",
                            uniq (sort @{$dependencies{$_}}));
        $output_rules .= $actions{$_};
@@ -4242,8 +4183,6 @@ sub handle_emacs_lisp

        $output_rules .= &file_contents ('lisp-clean');

-       push (@all, '$(ELCFILES)');
-
        my $varname;
        if (&variable_defined ('lisp_LISP'))
        {
@@ -4324,7 +4263,6 @@ sub handle_java
                      . '$(JAVACFLAGS) $?' . "\n"
                      . "\t" . 'echo timestamp > class' . $dir . '.stamp'
                      . "\n");
-    push (@all, 'class' . $dir . '.stamp');
     &push_dist_common ('$(' . $dir . '_JAVA)');
 }

@@ -7224,7 +7162,8 @@ sub am_install_var
     }

     # Push here because PRIMARY might be configure time determined.
-    push (@all, '$(' . $primary . ')')
+    # FIXME: Should be handled by the *.am files.
+    &depend ('all-am', '$(' . $primary . ')')
        if @used && $primary ne 'JAVA' && $primary ne 'PYTHON';

     # Make the result unique.  This lets the user use conditionals in
Index: configure.am
--- configure.am Sun, 04 Mar 2001 11:28:37 +0100 akim (am/h/32_configure. 1.2 
644)
+++ configure.am Sun, 04 Mar 2001 12:40:38 +0100 akim (am/h/32_configure. 1.2 
644)
@@ -23,6 +23,7 @@
          $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%

 ## This rule remakes the Makefile.
+all: %MAKEFILE%
 %MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% 
$(top_builddir)/config.status
        cd $(top_builddir) && \
          CONFIG_HEADERS= CONFIG_LINKS= \
Index: data.am
--- data.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/46_data.am 1.7 644)
+++ data.am Sun, 04 Mar 2001 12:40:54 +0100 akim (am/g/46_data.am 1.7 644)
@@ -16,6 +16,17 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

+
+## ----------------------------- ##
+## Hooks to high level targets.  ##
+## ----------------------------- ##
+
+all-am: $(DATA)
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
 ?EXEC?.PHONY install-exec-am: install-%DIR%DATA
 ?!EXEC?.PHONY install-data-am: install-%DIR%DATA
@@ -34,6 +45,10 @@
          echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
        done
+
+## -------------- ##
+## Uninstalling.  ##
+## -------------- ##

 .PHONY uninstall-am: uninstall-%DIR%DATA
 uninstall-%DIR%DATA:
Index: java.am
--- java.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/36_java.am 1.3 644)
+++ java.am Sun, 04 Mar 2001 13:10:07 +0100 akim (am/g/36_java.am 1.3 644)
@@ -16,6 +16,16 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

+## -------------------- ##
+## High level targets.  ##
+## -------------------- ##
+
+all-am: class%DIR%.stamp
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
 ?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
 install-%DIR%JAVA: class%DIR%.stamp
@@ -28,6 +38,11 @@
          echo " $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p"; \
          $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p; \
        done
+
+
+## -------------- ##
+## Uninstalling.  ##
+## -------------- ##

 .PHONY uninstall-am: uninstall-%DIR%JAVA
 uninstall-%DIR%JAVA:
Index: lisp.am
--- lisp.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/29_lisp.am 1.8 644)
+++ lisp.am Sun, 04 Mar 2001 13:08:14 +0100 akim (am/g/29_lisp.am 1.8 644)
@@ -16,6 +16,16 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

+## -------------------- ##
+## High level targets.  ##
+## -------------------- ##
+
+all-am: $(ELCFILES)
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
 ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
 ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
@@ -37,6 +47,10 @@
            $(INSTALL_DATA) $${p}c $(DESTDIR)$(%NDIR%dir)/$${f}c; \
          else : ; fi; \
        done
+
+## ------------- ##
+## Uninstallin.  ##
+## ------------- ##

 .PHONY uninstall-am: uninstall-%DIR%LISP
 uninstall-%DIR%LISP:
Index: mans-vars.am
--- mans-vars.am Wed, 21 Feb 2001 21:04:28 +0100 akim (am/g/25_mans-vars. 1.2 
644)
+++ mans-vars.am Sun, 04 Mar 2001 12:15:34 +0100 akim (am/g/25_mans-vars. 1.2 
644)
@@ -17,11 +17,3 @@
 ## 02111-1307, USA.

 NROFF = nroff
-
-## FIXME: This is not elegant: there is more than simply variables,
-## but we take advantage of the facts that these are factored dependencies,
-## and therefore will be output here, in the variable section.
-
-.PHONY: install-man uninstall-man
-?INSTALL-MAN?install-data-am: install-man
-?INSTALL-MAN?uninstall-am: uninstall-man
Index: mans.am
--- mans.am Tue, 27 Feb 2001 20:24:10 +0100 akim (am/g/24_mans.am 1.9 644)
+++ mans.am Sun, 04 Mar 2001 12:41:43 +0100 akim (am/g/24_mans.am 1.9 644)
@@ -16,9 +16,25 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

+
+## --------------------------------- ##
+## Hooking to higher level targets.  ##
+## --------------------------------- ##
+
+?INSTALL-MAN?all-am: $(MANS)
+
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
 ## MANS primary are always installed in mandir, hence install-data
 ## is hard coded.
+.PHONY: install-man
+?INSTALL-MAN?install-data-am: install-man
+
 ?INSTALL-MAN?_am_installdirs += $(DESTDIR)$(man%SECTION%dir)
+
 .PHONY install-man: install-man%SECTION%
 install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
@@ -46,7 +62,15 @@
          $(INSTALL_DATA) $$file $(DESTDIR)$(man%SECTION%dir)/$$inst; \
        done

+
+## -------------- ##
+## Uninstalling.  ##
+## -------------- ##
+
 ## This is just completely gross.
+.PHONY: uninstall-man
+?INSTALL-MAN?uninstall-am: uninstall-man
+
 .PHONY uninstall-man: uninstall-man%SECTION%
 uninstall-man%SECTION%:
        @$(NORMAL_UNINSTALL)
Index: remake-hdr.am
--- remake-hdr.am Sun, 04 Mar 2001 11:28:37 +0100 akim (am/g/17_remake-hdr 1.5 
644)
+++ remake-hdr.am Sun, 04 Mar 2001 12:40:13 +0100 akim (am/g/17_remake-hdr 1.5 
644)
@@ -16,6 +16,11 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+## Be sure to remake config.h before the recursive targets.
+## Well, at least `all'.
+all: %CONFIG_HEADER%
+
 %CONFIG_HEADER%: %STAMP%
 ## Recover from removal of CONFIG_HEADER
        @if test ! -f $@; then \
Index: scripts.am
--- scripts.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/15_scripts.am 1.4 644)
+++ scripts.am Sun, 04 Mar 2001 12:41:56 +0100 akim (am/g/15_scripts.am 1.4 644)
@@ -16,6 +16,17 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

+## ----------------------------- ##
+## Hooks to high level targets.  ##
+## ----------------------------- ##
+
+all-am: $(SCRIPTS)
+
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
 _am_installdirs += $(DESTDIR)$(%NDIR%dir)
 ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
@@ -34,6 +45,11 @@
            $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
          else :; fi; \
        done
+
+
+## -------------- ##
+## Uninstalling.  ##
+## -------------- ##

 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
 uninstall-%DIR%SCRIPTS:
Index: texinfos.am
--- texinfos.am Fri, 02 Mar 2001 00:21:13 +0100 akim (am/g/10_texinfos.a 1.13 
644)
+++ texinfos.am Sun, 04 Mar 2001 12:43:09 +0100 akim (am/g/10_texinfos.a 1.13 
644)
@@ -22,6 +22,11 @@
 .dvi.ps:
        $(DVIPS) $< -o $@

+
+## --------------------------------- ##
+## Hooking to higher level targets.  ##
+## --------------------------------- ##
+
 .PHONY: info info-am dvi dvi-am
 ?SUBDIRS?.PHONY info: info-recursive
 ?SUBDIRS?.PHONY dvi: dvi-recursive
@@ -30,6 +35,18 @@
 info-am: $(INFO_DEPS)
 dvi-am: $(DVIS)

+
+## Make sure documentation is made and installed first.  Use
+## $(INFO_DEPS), not 'info', because otherwise recursive makes get run
+## twice during "make all".
+?INSTALL-INFO?all-am: $(INFO_DEPS)
+
+
+## ------------ ##
+## Installing.  ##
+## ------------ ##
+
+
 ## Look in both . and srcdir because the info pages might have been
 ## rebuilt in the build directory.  Can't cd to srcdir; that might
 ## break a possible install-sh reference.
@@ -108,6 +125,11 @@
           else :; fi); \
        done

+
+## --------- ##
+## Disting.  ##
+## --------- ##
+
 .PHONY: dist-info
 dist-info: $(INFO_DEPS)
        list='$(INFO_DEPS)'; \
@@ -122,6 +144,10 @@
          done; \
        done

+
+## ---------- ##
+## Cleaning.  ##
+## ---------- ##

 ## How to clean.  The funny name is due to --cygnus influence; in
 ## Cygnus mode, `clean-info' is a target that users can use.
Index: m4/Makefile.in
--- m4/Makefile.in Fri, 02 Mar 2001 00:21:13 +0100 akim (am/h/15_Makefile.i 
1.25 644)
+++ m4/Makefile.in Sun, 04 Mar 2001 15:16:21 +0100 akim (am/h/15_Makefile.i 
1.25 644)
@@ -96,7 +96,8 @@

 DIST_COMMON = Makefile.am Makefile.in

-all: all-am
+all: $(BUILT_SOURCES) Makefile
+       $(MAKE) $(AM_MAKEFLAGS) all-am
 .SUFFIXES:

 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
@@ -147,7 +148,6 @@
        done
 check-am: all-am
 check: check-am
-all-am: Makefile $(DATA)

 installdirs:
        $(mkinstalldirs) $(DESTDIR)$(m4datadir)
@@ -178,6 +178,8 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
+all-am: $(DATA)
+
 clean: clean-am

 clean-am: clean-generic mostlyclean-am
Index: tests/Makefile.in
--- tests/Makefile.in Fri, 02 Mar 2001 00:21:13 +0100 akim (am/h/14_Makefile.i 
1.28 644)
+++ tests/Makefile.in Sun, 04 Mar 2001 15:16:22 +0100 akim (am/h/14_Makefile.i 
1.28 644)
@@ -363,7 +363,8 @@
 DIST_SOURCES =
 DIST_COMMON = Makefile.am Makefile.in

-all: all-am
+all: $(BUILT_SOURCES) Makefile
+       $(MAKE) $(AM_MAKEFLAGS) all-am
 .SUFFIXES:

 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
@@ -453,7 +454,6 @@
 check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
-all-am: Makefile

 installdirs:

@@ -483,6 +483,8 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
+all-am:
+
 clean: clean-am

 clean-am: clean-generic mostlyclean-am
Index: all.am
--- all.am Sun, 04 Mar 2001 15:16:25 +0100 akim ()
+++ all.am Sun, 04 Mar 2001 12:47:47 +0100 akim (am/h/33_all.am  644)
@@ -0,0 +1,22 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright 2001 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+.PHONY: all all-am
+all: $(BUILT_SOURCES)
+?SUBDIRS?      $(MAKE) $(AM_MAKEFLAGS) all-recursive
+?!SUBDIRS?     $(MAKE) $(AM_MAKEFLAGS) all-am



reply via email to

[Prev in Thread] Current Thread [Next in Thread]