]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make-lang.in (ada.install-common, [...]): Prepend $(DESTDIR) to the destination direc...
authorChristian Cornelssen <ccorn@cs.tu-berlin.de>
Tue, 28 Jan 2003 22:01:59 +0000 (23:01 +0100)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 28 Jan 2003 22:01:59 +0000 (22:01 +0000)
* Make-lang.in (ada.install-common, ada.uninstall):
Prepend $(DESTDIR) to the destination directory in all
(un)installation commands.
* Makefile.in (install-gnatlib): Ditto.  Rewrite $(LN)
commands to support DESTDIR with "ln" as well as with
"ln -s".

From-SVN: r62025

gcc/ada/ChangeLog
gcc/ada/Make-lang.in
gcc/ada/Makefile.in

index ccad86677f9fc609b703dc217fc07f382240aad4..84ce48b09e1bae5694afbce636455f419ad13112 100644 (file)
@@ -2715,3 +2715,14 @@ Thu Nov 15 18:16:17 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 2001-10-02  Geert Bosch  <bosch@gnat.com>
 
        * misc.c (insert_default_attributes): Add dummy version.
+2003-01-27  Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+       * Make-lang.in (ada.install-common): Let $(DESTDIR)$(bindir)
+       be created if necessary.  Remove erroneous and redundant
+       gnatchop installation commands.  Test for gnatdll before
+       attempting to install it.  Use initial tab instead of spaces
+       in continuation lines.
+       (ada.uninstall): Uninstall gnat instead of gnatcmd.
+       Also uninstall gnatfind, gnatxref, gnatlbr, and gnatdll
+       from all plausible locations.
+
index 3d771e386236c496a4d7813ff3cc29053e4e6fdb..b9fdd1cff2269951f2622020f0fb5bd4b86d77c7 100644 (file)
@@ -307,6 +307,21 @@ ada.install-common:
          fi ; \
        fi
        -if [ -f gnat1$(exeext) ] ; \
+       then \
+         if [ -f gnatchop-cross$(shext) ] ; \
+         then \
+           $(RM) $(DESTDIR)$(bindir)/$(target_alias)-gnatchop$(shext); \
+           $(INSTALL_PROGRAM) $(srcdir)/ada/gnatchop$(shext) $(DESTDIR)$(bindir)/$(target_alias)-gnatchop$(shext); \
+           if [ -d $(DESTDIR)$(tooldir)/bin/. ] ; then \
+              rm -f $(DESTDIR)$(tooldir)/bin/gnatchop$(shext); \
+              $(INSTALL_PROGRAM) gnatchop$(shext) $(DESTDIR)$(tooldir)/bin/gnatchop$(exeext); \
+            fi; \
+         else \
+           $(RM) $(DESTDIR)$(bindir)/gnatchop$(shext); \
+           $(INSTALL_PROGRAM) $(srcdir)/ada/gnatchop$(shext) $(DESTDIR)$(bindir)/gnatchop$(shext); \
+         fi ; \
+       fi
+       -if [ -f gnat1$(exeext) ] ; \
        then \
          if [ -f gnatchop-cross$(exeext) ] ; \
          then \
@@ -498,6 +513,13 @@ ada.install-common:
            $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
            $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \
        fi
+       -if [ -f gnat1$(exeext) ] ; \
+       then \
+         if [ -f gnatchop$(exeext) ] ; \
+         then \
+           $(RM) $(DESTDIR)$(bindir)/gnatchop$(exeext); \
+           $(INSTALL_PROGRAM) gnatchop$(exeext) $(DESTDIR)$(bindir)/gnatchop$(exeext); \
+         fi ; \
 #
 # Finally, install the library
 #
index c6d1f720d268161a7b87e651e5a83746c8656784..1f25d2ede92dd6e6fed4f177fa3e05d046505945 100644 (file)
@@ -2098,38 +2098,38 @@ install-gnatlib: stamp-gnatlib
 #      Create the directory before deleting it, in case the directory is
 #      a list of directories (as it may be on VMS). This ensures we are
 #      deleting the right one.
-       -$(MKDIR) $(ADA_RTL_OBJ_DIR)
-       -$(MKDIR) $(ADA_INCLUDE_DIR)
-       $(RMDIR) $(ADA_RTL_OBJ_DIR)
-       $(RMDIR) $(ADA_INCLUDE_DIR)
-       -$(MKDIR) $(ADA_RTL_OBJ_DIR)
-       -$(MKDIR) $(ADA_INCLUDE_DIR)
-       -$(INSTALL_DATA) ada/rts/Makefile.adalib $(ADA_RTL_OBJ_DIR)
+       -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+       -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+       $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+       $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+       -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
+       -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
+       -$(INSTALL_DATA) ada/rts/Makefile.adalib $(DESTDIR)$(ADA_RTL_OBJ_DIR)
        for file in ada/rts/*.ali; do \
-           $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
+           $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
        done
        -for file in ada/rts/*$(arext);do \
-           $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
+           $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
        done
 ifeq ($(strip $(filter-out alpha% dec vms%,$(targ))),)
        -for file in ada/rts/lib*$(soext);do \
-           $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
+           $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
        done
 else
        -for file in ada/rts/lib*-**$(soext);do \
-           $(INSTALL_DATA) $$file $(ADA_RTL_OBJ_DIR); \
+           $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
        done
 endif
-       -$(LN) $(ADA_RTL_OBJ_DIR)/libgnat-*$(soext) \
-              $(ADA_RTL_OBJ_DIR)/libgnat$(soext)
-       -$(LN) $(ADA_RTL_OBJ_DIR)/libgnarl-*$(soext) \
-              $(ADA_RTL_OBJ_DIR)/libgnarl$(soext)
+       -( cd $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
+         $(LN) libgnat-*$(soext) libgnat$(soext) )
+       -( cd $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
+         $(LN) libgnarl-*$(soext) libgnarl$(soext) )
 # This copy must be done preserving the date on the original file.
        for file in ada/rts/*.adb ada/rts/*.ads; do \
-           $(INSTALL_DATA_DATE) $$file $(ADA_INCLUDE_DIR); \
+           $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
        done
-       cd $(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
-       cd $(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
+       cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
+       cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
 
 ../stamp-gnatlib2:
        $(RM) rts/s-*.ali