[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix VPATH install of nobase_ files with Sun and OSF1/Tru64 Make (br
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: fix VPATH install of nobase_ files with Sun and OSF1/Tru64 Make (branch-1-8) |
Date: |
Mon, 05 Jan 2004 22:48:54 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
This one is for branch-1-8.
2004-01-05 Alexandre Duret-Lutz <address@hidden>
* lib/am/data.am, lib/am/lisp.am, lib/am/python.am,
lib/am/scripts.am: Strip any leading $(srcdir) from nobase_ files.
This fixes installation of nobase_ files in VPATH setups with Sun
and OSF1/Tru64 Make.
* tests/nobase.test: Augment to check installation from VPATH
builds.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.256.2.5
diff -u -r1.256.2.5 NEWS
--- NEWS 4 Jan 2004 02:01:09 -0000 1.256.2.5
+++ NEWS 5 Jan 2004 21:48:18 -0000
@@ -47,6 +47,10 @@
optimization performed by OSF1/Tru64 Make in its VPATH handling.
(tests/subpkg2.test failure)
+ - Fix another portability issue with Sun and OSF1/Tru64 Make.
+ In a VPATH-build configuration, `make install' would install
+ nobase_ files to wrong locations.
+
- Fix a Perl `uninitialized value' diagnostic occurring when
automake complains that a Texinfo file does not have a
@setfilename statement.
Index: lib/am/data.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/data.am,v
retrieving revision 1.41
diff -u -r1.41 data.am
--- lib/am/data.am 10 Nov 2003 20:55:32 -0000 1.41
+++ lib/am/data.am 5 Jan 2004 21:48:20 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -30,16 +30,21 @@
install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@$(NORMAL_INSTALL)
$(mkdir_p) $(DESTDIR)$(%NDIR%dir)
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+?!BASE? list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+?BASE? @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## If the _%PRIMARY% variable has an entry like foo/bar, install it as
## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
## new dir variable or use a nobase_ target for the latter case.
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE? f="$$p"; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+?!BASE? *) f=$$p;; \
+?!BASE? esac; \
echo " $(%DIR%%PRIMARY%_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
$(%DIR%%PRIMARY%_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
done
@@ -54,9 +59,14 @@
.PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
uninstall-%DIR%%PRIMARY%:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+?!BASE? list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+?BASE? @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE? f="$$p"; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+?!BASE? *) f=$$p;; \
+?!BASE? esac; \
echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
done
Index: lib/am/lisp.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/lisp.am,v
retrieving revision 1.39
diff -u -r1.39 lisp.am
--- lib/am/lisp.am 13 Nov 2003 19:39:06 -0000 1.39
+++ lib/am/lisp.am 5 Jan 2004 21:48:20 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003
+## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -61,13 +61,17 @@
## Do not install anything if EMACS was not found.
@if test "$(EMACS)" != no; then \
$(mkdir_p) $(DESTDIR)$(%NDIR%dir); \
+?!BASE? srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list='$(%DIR%_LISP)'; for p in $$list; do \
## A lisp file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE? f="$$p"; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;;
\
+?!BASE? *) f=$$p;; \
+?!BASE? esac; \
echo " $(%DIR%LISP_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
$(%DIR%LISP_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
## Only install .elc file if it exists.
@@ -90,9 +94,13 @@
@$(NORMAL_UNINSTALL)
## Do not uninstall anything if EMACS was not found.
@if test "$(EMACS)" != no; then \
+?!BASE? srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(%DIR%_LISP)'; for p in $$list; do \
?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
-?!BASE? f="$$p"; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;;
\
+?!BASE? *) f=$$p;; \
+?!BASE? esac; \
echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f
$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
rm -f $(DESTDIR)$(%NDIR%dir)/$$f $(DESTDIR)$(%NDIR%dir)/$${f}c; \
done; \
Index: lib/am/python.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/python.am,v
retrieving revision 1.18
diff -u -r1.18 python.am
--- lib/am/python.am 10 Nov 2003 20:55:32 -0000 1.18
+++ lib/am/python.am 5 Jan 2004 21:48:20 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
+## Copyright (C) 1999, 2001, 2003, 2004 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
@@ -30,15 +30,20 @@
install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
$(mkdir_p) $(DESTDIR)$(%NDIR%dir)
- @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+?!BASE? list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
+?BASE? @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
## A file can be in the source directory or the build directory.
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
## Compute basename of source file. Unless this is a nobase_ target, we
## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
-?BASE? d=`echo "$$p" | sed -e 's,^.*/,,'`; \
-?!BASE? d="$$p"; \
+?BASE? d=`echo $$p | sed -e 's,^.*/,,'`; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) d=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;;
\
+?!BASE? *) d=$$p;; \
+?!BASE? esac; \
dlist="$$dlist $$d"; \
## Don't perform translation, since script name is important.
echo " $(%DIR%PYTHON_INSTALL) $$b$$p $(DESTDIR)$(%NDIR%dir)/$$d"; \
@@ -59,9 +64,14 @@
.PHONY uninstall-am: uninstall-%DIR%PYTHON
uninstall-%DIR%PYTHON:
@$(NORMAL_UNINSTALL)
- list='$(%DIR%_PYTHON)'; for p in $$list; do \
-?BASE? d=`echo "$$p" | sed -e 's,^.*/,,'`; \
-?!BASE? d="$$p"; \
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+?!BASE? list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
+?BASE? @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
+?BASE? d=`echo $$p | sed -e 's,^.*/,,'`; \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) d=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;;
\
+?!BASE? *) d=$$p;; \
+?!BASE? esac; \
rm -f $(DESTDIR)$(%NDIR%dir)/$$d; \
## This is to remove the .pyc and .pyo byte compiled versions (a bit
## of a hack).
Index: lib/am/scripts.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/scripts.am,v
retrieving revision 1.51
diff -u -r1.51 scripts.am
--- lib/am/scripts.am 10 Nov 2003 20:55:32 -0000 1.51
+++ lib/am/scripts.am 5 Jan 2004 21:48:20 -0000
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -32,9 +32,14 @@
install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkdir_p) $(DESTDIR)$(%NDIR%dir)
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?!BASE? list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?BASE? @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) p=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+?!BASE? esac; \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
@@ -61,7 +66,12 @@
.PHONY uninstall-am: uninstall-%DIR%SCRIPTS
uninstall-%DIR%SCRIPTS:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?!BASE? @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+?!BASE? list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?BASE? @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
+?!BASE? case $$p in \
+?!BASE? $(srcdir)/*) p=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+?!BASE? esac; \
## Remove any leading directory before applying $(transform).
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
## Prepend the directory part if nobase_ is used.
Index: tests/nobase.test
===================================================================
RCS file: /cvs/automake/automake/tests/nobase.test,v
retrieving revision 1.11
diff -u -r1.11 nobase.test
--- tests/nobase.test 14 Nov 2003 21:25:59 -0000 1.11
+++ tests/nobase.test 5 Jan 2004 21:48:21 -0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -38,11 +38,11 @@
foo_HEADERS = sub/base.h
nobase_foo_HEADERS = sub/nobase.h
-foo_DATA = sub/base.dat
-nobase_foo_DATA = sub/nobase.dat
+dist_foo_DATA = sub/base.dat
+nobase_dist_foo_DATA = sub/nobase.dat
-fooexec_SCRIPTS = sub/base.sh
-nobase_fooexec_SCRIPTS = sub/nobase.sh
+dist_fooexec_SCRIPTS = sub/base.sh
+nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
fooexec_PROGRAMS = sub/base
nobase_fooexec_PROGRAMS = sub/nobase
@@ -122,3 +122,16 @@
test `find inst/foo -type f -print | wc -l` = 0
$MAKE install-strip
+
+# Likewise, in a VPATH build.
+
+$MAKE uninstall
+$MAKE distclean
+mkdir build
+cd build
+../configure --prefix `pwd`/inst --program-prefix=p
+$MAKE
+$MAKE test-install-data
+$MAKE test-install-exec
+$MAKE uninstall
+test `find inst/foo -type f -print | wc -l` = 0
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: fix VPATH install of nobase_ files with Sun and OSF1/Tru64 Make (branch-1-8),
Alexandre Duret-Lutz <=