[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
51-clean-am-status.patch
From: |
Akim Demaille |
Subject: |
51-clean-am-status.patch |
Date: |
Mon, 19 Mar 2001 10:20:57 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: Makefile.in
--- Makefile.in Sun, 11 Mar 2001 18:31:44 +0100 akim (am/h/16_Makefile.i 1.44
644)
+++ Makefile.in Sun, 11 Mar 2001 19:48:22 +0100 akim (am/h/16_Makefile.i 1.44
644)
@@ -521,7 +521,6 @@
distclean: distclean-recursive
-rm -f config.status
-
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -568,7 +567,6 @@
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
-
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
Index: automake.in
--- automake.in Sun, 11 Mar 2001 19:26:06 +0100 akim (am/f/39_automake.i 1.169
755)
+++ automake.in Sun, 11 Mar 2001 19:44:13 +0100 akim (am/f/39_automake.i 1.169
755)
@@ -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: clean.am
--- clean.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/50_clean.am 1.7 644)
+++ clean.am Sun, 11 Mar 2001 19:43:47 +0100 akim (am/g/50_clean.am 1.7 644)
@@ -49,3 +49,15 @@
?!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: distdir.am
--- distdir.am Sun, 11 Mar 2001 18:31:44 +0100 akim (am/h/17_distdir.am 1.16
644)
+++ distdir.am Sun, 11 Mar 2001 19:48:18 +0100 akim (am/h/17_distdir.am 1.16
644)
@@ -33,7 +33,7 @@
## 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 \
@@ -41,12 +41,14 @@
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%
@@ -128,13 +130,13 @@
## 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%
@@ -147,7 +149,7 @@
## 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
@@ -188,7 +190,7 @@
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
endif %?ZIP%
-endif %?TOPDIR%
+endif %?TOPDIR_P%
## ------------------------- ##
@@ -196,7 +198,7 @@
## ------------------------- ##
-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.
@@ -237,4 +239,4 @@
-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%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 51-clean-am-status.patch,
Akim Demaille <=