]> sourceware.org Git - automake.git/commitdiff
* automake.in (&make_paragraphs): Transform TOPDIR_P and TOPDIR.
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:55:12 +0000 (09:55 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:55:12 +0000 (09:55 +0000)
(&handle_dist): Don't.
(&handle_clean): Don't handle config.status here, let...
* clean.am: ... do it.
* distdir.am: Adjust.

ChangeLog
Makefile.in
automake.in
clean.am
distdir.am
lib/am/clean.am
lib/am/distdir.am

index 078c985a19c0263d7c0527072a4d839fc0f206b4..05306fc070012a2a0e4258f9585e5069a907eb02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&make_paragraphs): Transform TOPDIR_P and TOPDIR.
+       (&handle_dist): Don't.
+       (&handle_clean): Don't handle config.status here, let...
+       * clean.am: ... do it.
+       * distdir.am: Adjust.
+
 2001-04-09  Akim Demaille  <akim@epita.fr>
 
        * automake.in: Use strict vars and subs.
index b29004ae9dc34ffe8f99af6bc94c587553ffc2cb..de98e15722c14f8b3f16fafd25f62efde2115a4a 100644 (file)
@@ -519,7 +519,6 @@ dist-all: dist
 
 distclean: distclean-recursive
        -rm -f config.status
-
 distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
@@ -566,7 +565,6 @@ installcheck-am: installcheck-local
 
 maintainer-clean: maintainer-clean-recursive
        -rm -f config.status
-
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti
 
index 3e53c0aaf3a73813f127e075401b1c674212d0c8..9d5c3213bf3aa255e64fab294700a0127dcd80fb 100755 (executable)
@@ -3054,8 +3054,7 @@ sub handle_dist
     }
 
     # Rule to check whether a distribution is viable.
-    my %transform = ('TOPDIR'         => ($relative_dir eq '.'),
-                    'DISTCHECK-HOOK' => &target_defined ('distcheck-hook'),
+    my %transform = ('DISTCHECK-HOOK' => &target_defined ('distcheck-hook'),
                     'GETTEXT'        => $seen_gettext);
 
     # Prepend $(distdir) to each directory given.
@@ -3937,16 +3936,6 @@ sub handle_clean
                                      'MFILES'
                                      # A space is required in the join here.
                                      => join (' ', @maintainer_clean_files)));
-
-    # We special-case config.status here.  If we do it as part of the
-    # normal clean processing for this directory, then it might be
-    # removed before some subdir is cleaned.  However, that subdir's
-    # Makefile depends on config.status.
-    if ($relative_dir eq '.')
-    {
-       $actions{'distclean'} .= "\t-rm -f config.status\n";
-       $actions{'maintainer-clean'} .= "\t-rm -f config.status\n";
-    }
 }
 
 
@@ -6711,6 +6700,8 @@ sub make_paragraphs ($%)
                      'CK-NEWS'      => $options{'check-news'} || 0,
 
                      'SUBDIRS'      => &variable_defined ('SUBDIRS'),
+                     'TOPDIR'       => backname ($relative_dir),
+                     'TOPDIR_P'     => $relative_dir eq '.',
                      'CONFIGURE-AC' => $configure_ac,
 
                      'LIBTOOL'      => defined $configure_vars{'LIBTOOL'})
index 701d61e10ea14019ffb629b1dcbdf898649c5865..7e4b4161e67c433cf4cdaad7ca20a39a624c939a 100644 (file)
--- a/clean.am
+++ b/clean.am
@@ -49,3 +49,15 @@ clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
 ?!SUBDIRS?distclean: distclean-am
 ?!SUBDIRS?mostlyclean: mostlyclean-am
 ?!SUBDIRS?maintainer-clean: maintainer-clean-am
+
+## We special-case config.status here.  If we do it as part of the
+## normal clean processing for this directory, then it might be
+## removed before some subdir is cleaned.  However, that subdir's
+## Makefile depends on config.status.
+
+if %?TOPDIR_P%
+distclean:
+       -rm -f config.status
+maintainer-clean:
+       -rm -f config.status
+endif %?TOPDIR_P%
index 5c3b137f017834f12edf01071f9a49ed6e8f28de..a8db873c702b563ebe25c7d25ad829503a9f8593 100644 (file)
@@ -29,7 +29,7 @@ distdir: $(DISTFILES)
 ## For Gnits users, this is pretty handy.  Look at 15 lines
 ## in case some explanatory text is desirable.
 ##
-if %?TOPDIR%
+if %?TOPDIR_P%
 if  %?CK-NEWS%
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null;
        then :; else \
@@ -37,12 +37,14 @@ if  %?CK-NEWS%
          exit 1; \
        fi
 endif  %?CK-NEWS%
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 ##
 ## Only for the top dir.
 ##
-?TOPDIR?       -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
-?TOPDIR?       mkdir $(distdir)
+if %?TOPDIR_P%
+       -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+       mkdir $(distdir)
+endif %?TOPDIR_P%
 ##
 ##
 ?DISTDIRS?     $(mkinstalldirs) %DISTDIRS%
@@ -124,13 +126,13 @@ endif %?DIST-TARGETS%
 ## We use $(install_sh) because that is a known-portable way to modify
 ## the file in place in the source tree.
 ##
-if %?TOPDIR%
+if %?TOPDIR_P%
        -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 \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 
 
 
@@ -143,7 +145,7 @@ endif %?TOPDIR%
 ## the only reason) is that some versions of tar (e.g., OSF1)
 ## interpret `-z' differently.
 
-if %?TOPDIR%
+if %?TOPDIR_P%
 
 GZIP_ENV = --best
 .PHONY: dist-all dist
@@ -184,7 +186,7 @@ dist-zip: distdir
        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
 endif  %?ZIP%
 
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 
 
 ## ------------------------- ##
@@ -192,7 +194,7 @@ endif %?TOPDIR%
 ## ------------------------- ##
 
 
-if %?TOPDIR%
+if %?TOPDIR_P%
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
@@ -233,4 +235,4 @@ distcheck: dist
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        @echo "$(distdir).tar.gz is ready for distribution" | \
          sed 'h;s/./=/g;p;x;p;x'
-endif %?TOPDIR%
+endif %?TOPDIR_P%
index 701d61e10ea14019ffb629b1dcbdf898649c5865..7e4b4161e67c433cf4cdaad7ca20a39a624c939a 100644 (file)
@@ -49,3 +49,15 @@ clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
 ?!SUBDIRS?distclean: distclean-am
 ?!SUBDIRS?mostlyclean: mostlyclean-am
 ?!SUBDIRS?maintainer-clean: maintainer-clean-am
+
+## We special-case config.status here.  If we do it as part of the
+## normal clean processing for this directory, then it might be
+## removed before some subdir is cleaned.  However, that subdir's
+## Makefile depends on config.status.
+
+if %?TOPDIR_P%
+distclean:
+       -rm -f config.status
+maintainer-clean:
+       -rm -f config.status
+endif %?TOPDIR_P%
index 5c3b137f017834f12edf01071f9a49ed6e8f28de..a8db873c702b563ebe25c7d25ad829503a9f8593 100644 (file)
@@ -29,7 +29,7 @@ distdir: $(DISTFILES)
 ## For Gnits users, this is pretty handy.  Look at 15 lines
 ## in case some explanatory text is desirable.
 ##
-if %?TOPDIR%
+if %?TOPDIR_P%
 if  %?CK-NEWS%
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null;
        then :; else \
@@ -37,12 +37,14 @@ if  %?CK-NEWS%
          exit 1; \
        fi
 endif  %?CK-NEWS%
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 ##
 ## Only for the top dir.
 ##
-?TOPDIR?       -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
-?TOPDIR?       mkdir $(distdir)
+if %?TOPDIR_P%
+       -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+       mkdir $(distdir)
+endif %?TOPDIR_P%
 ##
 ##
 ?DISTDIRS?     $(mkinstalldirs) %DISTDIRS%
@@ -124,13 +126,13 @@ endif %?DIST-TARGETS%
 ## We use $(install_sh) because that is a known-portable way to modify
 ## the file in place in the source tree.
 ##
-if %?TOPDIR%
+if %?TOPDIR_P%
        -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 \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 
 
 
@@ -143,7 +145,7 @@ endif %?TOPDIR%
 ## the only reason) is that some versions of tar (e.g., OSF1)
 ## interpret `-z' differently.
 
-if %?TOPDIR%
+if %?TOPDIR_P%
 
 GZIP_ENV = --best
 .PHONY: dist-all dist
@@ -184,7 +186,7 @@ dist-zip: distdir
        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
 endif  %?ZIP%
 
-endif %?TOPDIR%
+endif %?TOPDIR_P%
 
 
 ## ------------------------- ##
@@ -192,7 +194,7 @@ endif %?TOPDIR%
 ## ------------------------- ##
 
 
-if %?TOPDIR%
+if %?TOPDIR_P%
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
@@ -233,4 +235,4 @@ distcheck: dist
        -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
        @echo "$(distdir).tar.gz is ready for distribution" | \
          sed 'h;s/./=/g;p;x;p;x'
-endif %?TOPDIR%
+endif %?TOPDIR_P%
This page took 0.052721 seconds and 5 git commands to generate.