Make-lang.in (c++.install-common, [...]): Prepend $(DESTDIR) to destination paths in all (un)installation commands.

2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>

	* Make-lang.in (c++.install-common, c++.install-man,
	c++.uninstall): Prepend $(DESTDIR) to destination paths in
	all (un)installation commands.
	(c++.install-common): Rewrite $(LN) commands to support
	DESTDIR with "ln" as well as with "ln -s".

From-SVN: r61079
This commit is contained in:
Christian Cornelssen 2003-01-09 09:04:52 +01:00 committed by Andreas Jaeger
parent 1d27195cb6
commit 2c6ce97ed1
2 changed files with 44 additions and 31 deletions

View File

@ -1,3 +1,11 @@
2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Make-lang.in (c++.install-common, c++.install-man,
c++.uninstall): Prepend $(DESTDIR) to destination paths in
all (un)installation commands.
(c++.install-common): Rewrite $(LN) commands to support
DESTDIR with "ln" as well as with "ln -s".
2003-01-08 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_primary_expression): See through explicitly

View File

@ -129,27 +129,32 @@ c++.install-normal:
c++.install-common: installdirs
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
$(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
if [ -d $(gcc_tooldir)/bin/. ] ; then \
rm -f $(gcc_tooldir)/bin/g++$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(gcc_tooldir)/bin/g++$(exeext); \
rm -f $(gcc_tooldir)/bin/c++$(exeext); \
$(LN) $(gcc_tooldir)/bin/g++$(exeext) $(gcc_tooldir)/bin/c++$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_CROSS_NAME)$(exeext) $(CXX_CROSS_NAME)$(exeext) ); \
if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \
( cd $(DESTDIR)$(gcc_tooldir)/bin && \
$(LN) g++$(exeext) c++$(exeext) ); \
else true; fi; \
else \
rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
$(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
$(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
rm -f $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
$(LN) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) ); \
rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_INSTALL_NAME)$(exeext) $(GXX_TARGET_INSTALL_NAME)$(exeext) ); \
rm -f $(DESTDIR)$(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(CXX_INSTALL_NAME)$(exeext) $(CXX_TARGET_INSTALL_NAME)$(exeext) ); \
fi ; \
fi
@ -158,23 +163,23 @@ c++.install-info:
c++.install-man: installdirs $(srcdir)/cp/g++.1
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
$(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
chmod a-x $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
$(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
else \
rm -f $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
$(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
chmod a-x $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
$(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
fi; \
else true; fi
c++.uninstall:
-rm -rf $(bindir)/$(CXX_INSTALL_NAME)$(exeext)
-rm -rf $(bindir)/$(CXX_CROSS_NAME)$(exeext)
-rm -rf $(bindir)/$(GXX_INSTALL_NAME)$(exeext)
-rm -rf $(bindir)/$(GXX_CROSS_NAME)$(exeext)
-rm -rf $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
-rm -rf $(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext)
-rm -rf $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.