]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (bindir): Import from autoconf and pass down to submake.
authorDave Korn <dave.korn.cygwin@gmail.com>
Fri, 24 Feb 2012 16:17:01 +0000 (16:17 +0000)
committerDave Korn <davek@gcc.gnu.org>
Fri, 24 Feb 2012 16:17:01 +0000 (16:17 +0000)
libada/ChangeLog:

* Makefile.in (bindir): Import from autoconf and pass down to submake.

gcc/ada/ChangeLog:

* gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
Windows-specific make variable.
(WIN_SO_INSTALL_DIR [windows targets]): Likewise.
(install-gnatlib): Respect the above during installation when set,
and also install any windows import library that has been built.
(gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
build a corresponding import library.

From-SVN: r184558

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in
libada/ChangeLog
libada/Makefile.in

index f3cf57efdb385c2c3c894cee8d7ec2a6976eac40..34f0b3e475b5fbba808fc1ca0bb9ebd4784d5dc0 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       * gcc-interface/Makefile.in (WIN_SO_PREFIX [windows targets]): New
+       Windows-specific make variable.
+       (WIN_SO_INSTALL_DIR [windows targets]): Likewise.
+       (install-gnatlib): Respect the above during installation when set,
+       and also install any windows import library that has been built.
+       (gnatlib-shared-win32): Use WIN_SO_PREFIX to name output DLL and also
+       build a corresponding import library.
+
 2012-02-22  Robert Dewar  <dewar@adacore.com>
 
        * exp_util.adb, make.adb, sem_dim.adb, sem_ch4.adb, exp_disp.adb: Minor
index 72569032a1082f34b59abc40a1ef45d4ed1ba246..5fa6ffa07021fd7e2255ef920bfa26abaeaf27d4 100644 (file)
@@ -1589,16 +1589,19 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
   # the Cygwin port has always been a CygMing frankenhybrid and it is
   # a long-term project to disentangle them.
   ifeq ($(strip $(filter-out cygwin%,$(osys))),)
+    WIN_SO_PREFIX=cyg
     LIBGNAT_TARGET_PAIRS = \
     s-memory.adb<s-memory.adb \
     g-socthi.ads<g-socthi.ads \
     g-socthi.adb<g-socthi.adb
   else
+    WIN_SO_PREFIX=lib
     LIBGNAT_TARGET_PAIRS = \
     s-memory.adb<s-memory-mingw.adb \
     g-socthi.ads<g-socthi-mingw.ads \
     g-socthi.adb<g-socthi-mingw.adb
   endif
+  WIN_SO_INSTALL_DIR = $(bindir)
   LIBGNAT_TARGET_PAIRS += \
   a-dirval.adb<a-dirval-mingw.adb \
   a-excpol.adb<a-excpol-abort.adb \
@@ -2449,11 +2452,14 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
 #     for shared libraries on some targets, e.g. on HP-UX where the x
 #     permission is required.
 #     Also install the .dSYM directories if they exist (these directories
-#     contain the debug information for the shared libraries on darwin)
+#     contain the debug information for the shared libraries on darwin),
+#     and the windows import libraries if they exist.
+       libpfx=$(if $(WIN_SO_PREFIX),$(WIN_SO_PREFIX),lib); \
+       librtlobjdir=$(if $(WIN_SO_INSTALL_DIR),$(WIN_SO_INSTALL_DIR),$(ADA_RTL_OBJ_DIR)); \
        for file in gnat gnarl; do \
-          if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
-             $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
-                        $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
+          if [ -f $(RTSDIR)/$${libpfx}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
+             $(INSTALL) $(RTSDIR)/$${libpfx}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
+                        $(DESTDIR)$${librtlobjdir}; \
           fi; \
           if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
              $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
@@ -2463,6 +2469,10 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
              $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
                $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
           fi; \
+          if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext)$(arext) ]; then \
+             $(INSTALL_DATA) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext)$(arext) \
+                        $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
+          fi; \
        done
 # This copy must be done preserving the date on the original file.
        for file in $(RTSDIR)/*.ad?; do \
@@ -2674,16 +2684,18 @@ gnatlib-shared-win32:
        cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
                $(PICFLAG_FOR_TARGET) \
-               -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+               -o $(WIN_SO_PREFIX)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+               -Wl,-out-implib,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)$(arext) \
                $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
-               $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
+               $(SO_OPTS)$(WIN_SO_PREFIX)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
        cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
                $(PICFLAG_FOR_TARGET) \
-               -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+               -o $(WIN_SO_PREFIX)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+               -Wl,-out-implib,libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)$(arext) \
                $(GNATRTL_TASKING_OBJS) \
-               $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-               $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
+               $(SO_OPTS)$(WIN_SO_PREFIX)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+               $(THREADSLIB) -L. -lgnat$(hyphen)$(LIBRARY_VERSION)
 
 gnatlib-shared-darwin:
        $(MAKE) $(FLAGS_TO_PASS) \
index 9a0db22cf8a0e04b63904f16291b86344e1cd8a2..256ccccf016b76d9ace3620bc3134e50ba659132 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-24  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       * Makefile.in (bindir): Import from autoconf and pass down to submake.
+
 2012-01-22  Douglas B Rupp  <rupp@gnat.com>
 
        * configure: Regenerate.
index 5389dd005defed08eda67820a90587e98199ed3d..36cf5ad5e5ab10057fd7499129a12b4308f90f77 100644 (file)
@@ -33,6 +33,7 @@ MULTICLEAN = true
 SHELL = @SHELL@
 srcdir = @srcdir@
 libdir = @libdir@
+bindir = @bindir@
 build = @build@
 target = @target@
 prefix = @prefix@
@@ -83,6 +84,7 @@ LIBADA_FLAGS_TO_PASS = \
         "TRACE=$(TRACE)" \
         "MULTISUBDIR=$(MULTISUBDIR)" \
         "libsubdir=$(libsubdir)" \
+        "bindir=$(bindir)" \
         "objext=$(objext)" \
         "prefix=$(prefix)" \
         "exeext=.exeext.should.not.be.used " \