From: Tom Tromey Date: Sun, 31 Dec 1995 20:46:00 +0000 (+0000) Subject: Many changes from Jim and Franc,ois X-Git-Tag: Release-0-26~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69fc150fbb5a0c8fdc110506501320e151102bff;p=thirdparty%2Fautomake.git Many changes from Jim and Franc,ois --- diff --git a/ChangeLog b/ChangeLog index 8d6327679..ea534dbb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +Sun Dec 31 13:04:59 1995 Tom Tromey + + * 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 * texinfos.am (uninstall-info): Bug fix. diff --git a/NEWS b/NEWS index ac96f4782..d751468c4 100644 --- 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 New in 0.25: * Bug fixes. diff --git a/automake.in b/automake.in index 8c43f072d..904d9bcd7 100755 --- a/automake.in +++ b/automake.in @@ -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; \\ diff --git a/depend.am b/depend.am index d42d5b214..25b74a8c1 100644 --- 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 diff --git a/dist-subd-top.am b/dist-subd-top.am index f504e3fc4..34d2a7e14 100644 --- a/dist-subd-top.am +++ b/dist-subd-top.am @@ -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 diff --git a/dist-subd.am b/dist-subd.am index 4c0a0c432..826cc53cf 100644 --- a/dist-subd.am +++ b/dist-subd.am @@ -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 02480b6ad..aaf07626e 100644 --- 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 \ diff --git a/lib/am/depend.am b/lib/am/depend.am index d42d5b214..25b74a8c1 100644 --- a/lib/am/depend.am +++ b/lib/am/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 diff --git a/programs-clean.am b/programs-clean.am index d606d9585..84f2f64e4 100644 --- a/programs-clean.am +++ b/programs-clean.am @@ -1,7 +1,7 @@ mostlyclean-@DIR@PROGRAMS: clean-@DIR@PROGRAMS: - rm -f $(@DIR@PROGRAMS) + rm -f $(@DIR@_PROGRAMS) distclean-@DIR@PROGRAMS: