From 76a56818f0eda269841209a76b0c5b9d70e7fd42 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 21 Feb 2001 08:21:43 +0000 Subject: [PATCH] * distdir.am (distdir): Handle the DIST-TARGETS. * automake.in (&handle_dist_worker): Don't. --- ChangeLog | 6 ++++++ Makefile.in | 4 +++- automake.in | 26 ++++++++++---------------- distdir.am | 9 ++++++++- lib/am/distdir.am | 9 ++++++++- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88ede2a6..12f0c3d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-02-21 Akim Demaille + + * distdir.am (distdir): Handle the DIST-TARGETS. + * automake.in (&handle_dist_worker): Don't. + + 2001-02-21 Akim Demaille * automake.in (&file_contents): Transform the global options (such diff --git a/Makefile.in b/Makefile.in index 34dfb705..d5d0fd82 100644 --- a/Makefile.in +++ b/Makefile.in @@ -516,6 +516,9 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ @@ -525,7 +528,6 @@ distdir: $(DISTFILES) dist: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info info-am: $(INFO_DEPS) info: info-recursive dvi-am: $(DVIS) diff --git a/automake.in b/automake.in index 74f43a61..65bb252c 100755 --- a/automake.in +++ b/automake.in @@ -2656,26 +2656,20 @@ sub handle_dist_worker 'TOP_DISTDIR' => $top_distdir); } - $output_rules .= - &file_contents ('distdir', - $xform - . &transform_cond ('SUBDIRS' => - &variable_defined ('SUBDIRS'))); - # If the target `dist-hook' exists, make sure it is run. This # allows users to do random weird things to the distribution # before it is packaged up. - push (@dist_targets, 'dist-hook') if &target_defined ('dist-hook'); + push (@dist_targets, 'dist-hook') + if &target_defined ('dist-hook'); - local ($targ); - foreach $targ (@dist_targets) - { - # We must explicitly set distdir and top_distdir for these - # sub-makes. - $output_rules .= ("\t\$(MAKE) \$(AM_MAKEFLAGS)" - . " top_distdir=\"\$(top_distdir)\"" - . " distdir=\"\$(distdir)\" $targ\n"); - } + $output_rules .= + &file_contents ('distdir', + $xform + . &transform ('DIST-TARGETS' => join " ", @dist_targets) + . &transform_cond ('DIST-TARGETS' => + scalar @dist_targets, + 'SUBDIRS' => + &variable_defined ('SUBDIRS'))); } # Handle 'dist' target. diff --git a/distdir.am b/distdir.am index ac168943..e6df942e 100644 --- a/distdir.am +++ b/distdir.am @@ -81,6 +81,14 @@ distdir: $(DISTFILES) ?SUBDIRS? fi; \ ?SUBDIRS? done ## +## We might have to perform some last second updates, such as updating +## info files. +## We must explicitly set distdir and top_distdir for these sub-makes. +## +?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ +?DIST-TARGETS? top_distdir="$(top_distdir)" distdir="$(distdir)" \ +?DIST-TARGETS? @DIST-TARGETS@ +## ## This complex find command will try to avoid changing the modes of ## links into the source tree, in case they're hard-linked. It will ## also make directories writable by everybody, because some @@ -123,7 +131,6 @@ distdir: $(DISTFILES) ?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2 -?TOPDIR??BZIP2?.PHONY: dist-bzip2 ?TOPDIR??BZIP2?dist-bzip2: distdir ?TOPDIR??BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ?TOPDIR??BZIP2? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) diff --git a/lib/am/distdir.am b/lib/am/distdir.am index ac168943..e6df942e 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -81,6 +81,14 @@ distdir: $(DISTFILES) ?SUBDIRS? fi; \ ?SUBDIRS? done ## +## We might have to perform some last second updates, such as updating +## info files. +## We must explicitly set distdir and top_distdir for these sub-makes. +## +?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ +?DIST-TARGETS? top_distdir="$(top_distdir)" distdir="$(distdir)" \ +?DIST-TARGETS? @DIST-TARGETS@ +## ## This complex find command will try to avoid changing the modes of ## links into the source tree, in case they're hard-linked. It will ## also make directories writable by everybody, because some @@ -123,7 +131,6 @@ distdir: $(DISTFILES) ?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2 -?TOPDIR??BZIP2?.PHONY: dist-bzip2 ?TOPDIR??BZIP2?dist-bzip2: distdir ?TOPDIR??BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ?TOPDIR??BZIP2? -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) -- 2.43.5