]> sourceware.org Git - automake.git/commitdiff
Many changes from Jim and Franc,ois
authorTom Tromey <tromey@redhat.com>
Sun, 31 Dec 1995 20:45:53 +0000 (20:45 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 31 Dec 1995 20:45:53 +0000 (20:45 +0000)
ChangeLog
NEWS
automake.in
depend.am
dist-subd-top.am
dist-subd.am
dist.am
lib/am/depend.am
programs-clean.am

index 8d63276792f5706c7e7454c49e4e4af537ec6811..ea534dbb503303f0b0f8256d81da0eb2176c8c07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+Sun Dec 31 13:04:59 1995  Tom Tromey  <tromey@cambric.colorado.edu>
+
+       * automake.in (initialize_global_constants): Don't print body of
+       loop at make time.
+
+       Changes from François Pinard:
+       * depend.am (MKDEP): Include DEFS, INCLUDES, CPPFLAGS, CFLAGS.
+       (DEP_FILES): Put dependency files in $(srcdir).
+       Look in $(srcdir) when including dependency files.
+       ($(srcdir)/.deps/.P): .deps/.P is in $(srcdir).
+       (.deps/%.P): MKDEP includes all macro expansions.
+       * dist-subd-top.am (dist): Get absolute path for distdir.  Don't
+       be so verbose.
+       * dist-subd.am (dist): Don't be so verbose.
+       * dist.am (dist): Don't be so verbose.
+
+       * automake.in (do_one_clean_target): Remove config.status in
+       maintainer-clean.  From Jim Meyering.
+
+       * programs-clean.am (clean-@DIR@PROGRAMS): Bug fix.  From Jim
+       Meyering.
+
+       * automake.in (handle_merge_targets): Add dummy command for empty
+       install target.  From Jim Meyering.
+
 Tue Dec 12 10:06:28 1995  Tom Tromey  <tromey@cambric.colorado.edu>
 
        * texinfos.am (uninstall-info): Bug fix.
diff --git a/NEWS b/NEWS
index ac96f4782d89278bb8ffcb1769ea8f631aa297ff..d751468c4c51a7569001eaae7872bcd3a1bcdf18 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 New in 0.26:
 * Added --install-missing option.
 * Pretty-prints generated macros
+* Comments in Makefile.am are placed more intelligently in Makefile.in
 \f
 New in 0.25:
 * Bug fixes.
index 8c43f072d115dbe755e78500f90bc6f44ff2d2b0..904d9bcd7aeee1de98917ddbf63d4ee4500ae96e 100755 (executable)
@@ -705,7 +705,7 @@ sub handle_dependencies
            }
 
            $output_rules .= "\n";
-       }       
+       }
     }
 }
 
@@ -928,6 +928,7 @@ sub handle_merge_targets
 
     $output_rules .= ('install: '
                      . join (' ', @install)
+                     . "\n\t:"
                      . "\n\n"
                      . 'uninstall: '
                      . join (' ', @uninstall)
@@ -1011,10 +1012,10 @@ sub do_one_clean_target
        $output_rules .=
            ("\t\@echo \"This command is intended for maintainers to use;\"\n"
             . "\t\@echo \"it deletes files that may require special "
-            . "tools to rebuild.\"\n");
+            . "tools to rebuild.\"\n"
+            . "\trm -f config.status\n");
     }
-    elsif ($name . $target eq 'distclean'
-          || $name . $target eq 'maintainer-clean')
+    elsif ($name . $target eq 'distclean')
     {
        $output_rules .= "\trm -f config.status\n";
     }
@@ -1214,7 +1215,7 @@ sub initialize_global_constants
 
     # Helper text for dealing with man pages.
     $install_man_format =
-    '  sect=@SECTION@;                         \\
+    '  \@sect=@SECTION@;                               \\
        inst=`echo "@MANBASE@" | sed \'$(transform)\'`.@FULLSECT@; \\
        echo installing @MAN@ as $(mandir)/man$$sect/$$inst; \\
        $(INSTALL_DATA) $(srcdir)/@MAN@ $(mandir)/man$$sect/$$inst; \\
index d42d5b2143b0b56bc7c8bec8ce5fc7bdebc07480..25b74a8c14ef9e0ae6dd432986d9403fbae5a655 100644 (file)
--- a/depend.am
+++ b/depend.am
@@ -2,27 +2,27 @@
 # GNU make and gcc.  It is only included in the generated Makefile.in
 # if `automake' is not passed the `--include-deps' flag.
 
-MKDEP = gcc -MM
+MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 
 ## Use $(kr) in case we are doing auto-deANSIfication.
-DEP_FILES = $(patsubst %.$(kr)o,.deps/%.P,$(OBJECTS))
+DEP_FILES = $(patsubst %.$(kr)o, $(srcdir)/.deps/%.P,$(OBJECTS))
 
 ## We use ".P" as the name of our placeholder because it can't be
 ## duplicated by any C source file.  (Well, there could be ".c", but
 ## no one does that in practice)
--include .deps/.P
-.deps/.P:
-       test -d .deps || mkdir .deps
+-include $(srcdir)/.deps/.P
+$(srcdir)/.deps/.P:
+       cd $(srcdir) && test -d .deps || mkdir .deps
 ## Use ":" here and not "echo timestamp".  Otherwise GNU Make barfs:
 ## .deps/.P:1: *** missing separator.  Stop.
        : > $@
 
 -include $(DEP_FILES)
-$(DEP_FILES): .deps/.P
+$(DEP_FILES): $(srcdir)/.deps/.P
 
-.deps/%.P: %.c
+$(srcdir)/.deps/%.P: $(srcdir)/%.c
        @echo "mkdeps $< > $@"
-       @$(MKDEP) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@-tmp
+       @$(MKDEP) $< > $@-tmp
        @mv $@-tmp $@
 
 # End of maintainer-only section
index f504e3fc4a4eee47b6f39cf4262187c9897d340b..34d2a7e14f62e802d2f6a325c723f980568d6c9e 100644 (file)
@@ -2,7 +2,10 @@ distdir = $(PACKAGE)-$(VERSION)
 dist: $(DISTFILES)
        rm -rf $(distdir)
        mkdir $(distdir)
-       (cd $(srcdir) && automake --include-deps --output-dir=$(distdir))
+## We need an absolute path for --output-dir.  Get that here.
+       distdir=`cd $(distdir) && pwd` \
+         && cd $(srcdir) \
+         && automake --include-deps --output-dir=$$distdir
        @for file in $(DISTFILES); do           \
 ## Test for file existence because sometimes a file gets included in
 ## DISTFILES twice.  For example this happens when a single source
@@ -10,13 +13,9 @@ dist: $(DISTFILES)
 ## situations in which "ln" can fail.  For instance a file to
 ## distribute could actually be a cross-filesystem symlink -- this can
 ## easily happen if "gettextize" was run on the distribution.
-         test -f $(distdir)/$$file || {        \
-           echo linking $$file;                \
-           ln $(srcdir)/$$file $(distdir)/$$file; \
-         } || {                                \
-           echo copying $$file instead;        \
-           cp -p $(srcdir)/$$file $(distdir)/$$file; \
-         };                                    \
+         test -f $(distdir)/$$file \
+           || ln $(srcdir)/$$file $(distdir)/$$file \
+           || cp -p $(srcdir)/$$file $(distdir)/$$file; \
        done
        for subdir in $(SUBDIRS); do            \
 ## Test for directory existence here because previous automake
index 4c0a0c4321c9be6aced44854184b910e15b5374a..826cc53cf5bb53ca09ea69f94facbfb8878dcd66 100644 (file)
@@ -2,12 +2,8 @@ distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 dist: $(DISTFILES)
        @for file in $(DISTFILES); do           \
 ## See dist-subd-top.am to understand this.
-         test -f $(distdir)/$$file || {        \
-           echo linking $$file;                \
-           ln $(srcdir)/$$file $(distdir)/$$file; \
-         } || {                                \
-           echo copying $$file instead;        \
-           cp -p $(srcdir)/$$file $(distdir)/$$file; \
-         };                                    \
+         test -f $(distdir)/$$file \
+           || ln $(srcdir)/$$file $(distdir)/$$file \
+           || cp -p $(srcdir)/$$file $(distdir)/$$file; \
        done
 
diff --git a/dist.am b/dist.am
index 02480b6adc69c1e54e71b78d419bac8537e60b17..aaf07626e2cdba7d2808c8aa1eccf278f57911a7 100644 (file)
--- a/dist.am
+++ b/dist.am
@@ -5,13 +5,9 @@ dist: $(DISTFILES)
        mkdir $(distdir)
        (cd $(srcdir) && automake --include-deps --output-dir=$(distdir))
        @for file in $(DISTFILES); do           \
-         test -f $(distdir)/$$file || {        \
-           echo linking $$file;                \
-           ln $(srcdir)/$$file $(distdir)/$$file; \
-         } || {                                \
-           echo copying $$file instead;        \
-           cp -p $(srcdir)/$$file $(distdir)/$$file; \
-         };                                    \
+         test -f $(distdir)/$$file \
+         || ln $(srcdir)/$$file $(distdir)/$$file \
+         || cp -p $(srcdir)/$$file $(distdir)/$$file; \
        done
        @sublist="$(DIST_SUBDIRS)";             \
        for dir in $$sublist; do                \
index d42d5b2143b0b56bc7c8bec8ce5fc7bdebc07480..25b74a8c14ef9e0ae6dd432986d9403fbae5a655 100644 (file)
@@ -2,27 +2,27 @@
 # GNU make and gcc.  It is only included in the generated Makefile.in
 # if `automake' is not passed the `--include-deps' flag.
 
-MKDEP = gcc -MM
+MKDEP = gcc -MM $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 
 ## Use $(kr) in case we are doing auto-deANSIfication.
-DEP_FILES = $(patsubst %.$(kr)o,.deps/%.P,$(OBJECTS))
+DEP_FILES = $(patsubst %.$(kr)o, $(srcdir)/.deps/%.P,$(OBJECTS))
 
 ## We use ".P" as the name of our placeholder because it can't be
 ## duplicated by any C source file.  (Well, there could be ".c", but
 ## no one does that in practice)
--include .deps/.P
-.deps/.P:
-       test -d .deps || mkdir .deps
+-include $(srcdir)/.deps/.P
+$(srcdir)/.deps/.P:
+       cd $(srcdir) && test -d .deps || mkdir .deps
 ## Use ":" here and not "echo timestamp".  Otherwise GNU Make barfs:
 ## .deps/.P:1: *** missing separator.  Stop.
        : > $@
 
 -include $(DEP_FILES)
-$(DEP_FILES): .deps/.P
+$(DEP_FILES): $(srcdir)/.deps/.P
 
-.deps/%.P: %.c
+$(srcdir)/.deps/%.P: $(srcdir)/%.c
        @echo "mkdeps $< > $@"
-       @$(MKDEP) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@-tmp
+       @$(MKDEP) $< > $@-tmp
        @mv $@-tmp $@
 
 # End of maintainer-only section
index d606d9585cbf3ddce3801778c6925c6041aa6a07..84f2f64e481f8fa30985ae5f06c7791b74c02df6 100644 (file)
@@ -1,7 +1,7 @@
 mostlyclean-@DIR@PROGRAMS:
 
 clean-@DIR@PROGRAMS:
-       rm -f $(@DIR@PROGRAMS)
+       rm -f $(@DIR@_PROGRAMS)
 
 distclean-@DIR@PROGRAMS:
 
This page took 0.043112 seconds and 5 git commands to generate.