[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Automake branch, master, updated. Release-1-10-85-g4a6593e
From: |
Ralf Wildenhues |
Subject: |
[SCM] GNU Automake branch, master, updated. Release-1-10-85-g4a6593e |
Date: |
Sat, 08 Dec 2007 09:35:47 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=4a6593e3bd8f5c288bb1459bd33c786989d285e3
The branch, master has been updated
via 4a6593e3bd8f5c288bb1459bd33c786989d285e3 (commit)
from f57bd856b2a0e6ecd96fd34f112d28de18a9f212 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4a6593e3bd8f5c288bb1459bd33c786989d285e3
Author: Ralf Wildenhues <address@hidden>
Date: Sat Dec 8 10:33:21 2007 +0100
Fix the distdir target to cope with spaces in absolute file names.
* lib/am/distdir.am: Quote all instances of $(distdir) and
$(top_distdir). They could contain white space, coming from
a toplevel package bootstrapped with an older Automake version.
(am__relativize): New macro, taken from gnulib code, written by
Bruno Haible.
(distdir): Use it to compute relative paths to distdir and
top_distdir for enclosed subpackages.
Also, quote $(distuninstallcheck_dir).
* lib/am/texinfos.am: Likewise, quote $(distdir).
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++++++++
lib/am/distdir.am | 73 +++++++++++++++++++++++++++++++++++++++------------
lib/am/texinfos.am | 6 ++--
3 files changed, 72 insertions(+), 20 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fb86952..cd5b18d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-12-08 Ralf Wildenhues <address@hidden>
+
+ Fix the distdir target to cope with spaces in absolute file names.
+ * lib/am/distdir.am: Quote all instances of $(distdir) and
+ $(top_distdir). They could contain white space, coming from
+ a toplevel package bootstrapped with an older Automake version.
+ (am__relativize): New macro, taken from gnulib code, written by
+ Bruno Haible.
+ (distdir): Use it to compute relative paths to distdir and
+ top_distdir for enclosed subpackages.
+ Also, quote $(distuninstallcheck_dir).
+ * lib/am/texinfos.am: Likewise, quote $(distdir).
+
2007-11-26 Ralf Wildenhues <address@hidden>
Quote file names in tests that can be absolute.
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index ce547fd..4b68008 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -25,11 +25,46 @@ distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+
endif %?TOPDIR_P%
+if %?SUBDIRS%
+## computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
+## Input:
+## - DIR1 relative pathname, relative to the current directory
+## - DIR2 relative pathname, relative to the current directory
+## Output:
+## - reldir relative pathname of DIR2, relative to DIR1
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+endif %?SUBDIRS%
+
.PHONY: distdir
distdir: $(DISTFILES)
##
@@ -51,7 +86,7 @@ endif %?TOPDIR_P%
##
if %?TOPDIR_P%
$(am__remove_distdir)
- test -d $(distdir) || mkdir $(distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
endif %?TOPDIR_P%
##
##
@@ -140,15 +175,15 @@ endif %?TOPDIR_P%
## as Tru64) will magically create an empty directory in `.'
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
## Test for file existence because sometimes a file gets included in
## DISTFILES twice. For example this happens when a single source
## file is used in building more than one program.
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -167,12 +202,16 @@ if %?SUBDIRS%
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
## Disable am__remove_distdir so that sub-packages do not clear a
## directory we have already cleared and might even have populated
## (e.g. shared AUX dir in the sub-package).
@@ -213,13 +252,13 @@ endif %?DIST-TARGETS%
## the file in place in the source tree.
##
if %?TOPDIR_P%
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -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 $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
+ || chmod -R a+r "$(distdir)"
if %?FILENAME_FILTER%
- @if test -z "$(am__skip_length_check)" && find $(distdir) -type f
-print | \
+ @if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f
-print | \
grep '^%FILENAME_FILTER%' 1>&2; then \
echo 'error: the above filenames are too long' 1>&2; \
exit 1; \
@@ -403,7 +442,7 @@ distuninstallcheck_listfiles = find . -type f -print
distuninstallcheck:
## We use -le 1 because the `dir' file (created by install-info)
## might still exist after uninstall.
- @cd $(distuninstallcheck_dir) \
+ @cd '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 0d0053a..0ed31cf 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -1,7 +1,7 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+## 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -349,8 +349,8 @@ dist-info: $(INFO_DEPS)
if test -f $$file; then \
## Strip leading '$$d/'.
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
- cp -p $$file $(distdir)/$$relfile; \
+ test -f "$(distdir)/$$relfile" || \
+ cp -p $$file "$(distdir)/$$relfile"; \
else :; fi; \
done; \
done
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Automake branch, master, updated. Release-1-10-85-g4a6593e,
Ralf Wildenhues <=