This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA:] SUN make VPATH breakage at libsupc++ header installation
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Subject: [RFA:] SUN make VPATH breakage at libsupc++ header installation
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Fri, 1 Jun 2001 11:02:55 +0200
- CC: bug-automake at gnu dot org
Here's a patch to fix SUN make VPATH expansion breaking libsupc++ header
installation with the default automake rule, as noticed by Phil Edwards,
<URL:http://gcc.gnu.org/ml/gcc-patches/2001-05/msg02096.html>. I checked
other automake users; libjava/gcj has the same problem, though it's
excluded and not configured for sparc-sun-solaris2.8. Anyway,
libjava/Makefile.am uses several GNU make features ($(shell ...) $(foreach
...) $(subst ...)) so that's not the only non-GNU-make issue there.
Bootstrapped and checked on trunk and branch, sparc-sun-solaris2.8 with
and without GNU make, and on i686-pc-linux-gnu, no new failures.
automake people (CC:ed) might want to consider changing the default
installheader expansion along these lines, though they probably want to
tweak it to handle install_HEADERS with relative/path/names.h; something
like replacing p with p0 at the source end looks like it would
work.
The resulting Makefile.in is supplied for everybody's amusement.
Ok to commit, head and branch?
libstdc++-v3:
* libsupc++/Makefile.am (install-glibcppinstallHEADERS,
uninstall-glibcppinstallHEADERS): Have explicit rules catering to
SUN make VPATH peculiarities.
* libsupc++/Makefile.in: Regenerate.
Index: libstdc++-v3/libsupc++/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.26
diff -p -c -r1.26 Makefile.am
*** libstdc++-v3/libsupc++/Makefile.am 2001/05/03 20:35:14 1.26
--- libstdc++-v3/libsupc++/Makefile.am 2001/05/31 07:00:10
*************** LTCXXCOMPILE = $(LIBTOOL) --tag CXX --ta
*** 148,150 ****
--- 148,169 ----
CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
--mode=link $(CXX) \
@OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+ # We have to have rules modified from the default to counteract SUN make
+ # prepending each of $(glibcppinstall_HEADERS) with VPATH below.
+ install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
+ @list='$(glibcppinstall_HEADERS)'; for p0 in $$list; do \
+ p=`basename $$p0`; \
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p; \
+ done
+
+ uninstall-glibcppinstallHEADERS:
+ @$(NORMAL_UNINSTALL)
+ list='$(glibcppinstall_HEADERS)'; for p0 in $$list; do \
+ p=`basename $$p0`; \
+ rm -f $(DESTDIR)$(glibcppinstalldir)/$$p; \
+ done
*** libstdc++-v3/libsupc++/Makefile.in.xx Thu May 31 07:25:52 2001
--- libstdc++-v3/libsupc++/Makefile.in Thu May 31 08:56:50 2001
*************** libsupc++.la: $(libsupc___la_OBJECTS) $(
*** 379,399 ****
.cc.lo:
$(LTCXXCOMPILE) -c $<
- install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
- @list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p; \
- done
-
- uninstall-glibcppinstallHEADERS:
- @$(NORMAL_UNINSTALL)
- list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(glibcppinstalldir)/$$p; \
- done
-
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
--- 379,384 ----
*************** install uninstall-am uninstall all-redir
*** 525,530 ****
--- 510,534 ----
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+ # We have to have rules modified from the default to counteract SUN make
+ # prepending each of $(glibcppinstall_HEADERS) with VPATH below.
+ install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
+ @list='$(glibcppinstall_HEADERS)'; for p0 in $$list; do \
+ p=`basename $$p0`; \
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$p; \
+ done
+
+ uninstall-glibcppinstallHEADERS:
+ @$(NORMAL_UNINSTALL)
+ list='$(glibcppinstall_HEADERS)'; for p0 in $$list; do \
+ p=`basename $$p0`; \
+ rm -f $(DESTDIR)$(glibcppinstalldir)/$$p; \
+ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
brgds, H-P