]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
On cygwin, do not build the library in a local directory first but right in place.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Feb 2013 17:29:06 +0000 (17:29 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Feb 2013 17:29:06 +0000 (17:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@28311 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/source/Makefile

index fcc86e355e7fefc1255d092d6f9ec8e5c3e7db14..50a23b705616cccb1175c1882e29d0566dd24b14 100644 (file)
@@ -153,6 +153,15 @@ never working correctly and it is not used.
 
 
 <ol>
+<li> Fixed: Starting in release 7.1, we first built the deal.II shared libraries
+in the local <code>/tmp</code> or similar directory rather than the final location
+because linking becomes very slow over remotely mounted file systems. Unfortunately,
+this schemes turns out not to work under Cygwin on Windows systems: executables
+cannot link with libraries that have been moved/renamed after linking. If we are
+running on Cygwin, we therefore revert to the old scheme.
+<br>
+(Wolfgang Bangerth, 2013/02/11)
+
 <li> New: finite element FE_Q_DG0 that implements polynomials
 of order k with an additional discontinuous constant function.
 <br>
index d65507f9562f4b80bfb0f88a121d423229dcfda1..81b7840cb8c11df1fe77f5c3821bc8afa9827d82 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
-# Copyright by the deal.II authors, 1998, 1999, 2000, 2001, 2002, 2010, 2011, 2012
+# Copyright by the deal.II authors, 1998, 1999, 2000, 2001, 2002, 2010, 2011, 2012, 2013
 
 
 ifneq ($(CLEAN),yes)
@@ -170,20 +170,40 @@ $(LIBDIR)/libdeal_II$(static-lib-suffix): $(o-files) $(extra-o-files)
 # slow on remotely mounted file systems. Consequently, we link in a
 # local file in the $TMPDIR directory, and only after the fact move
 # them to their final location
+#
+# That said, it turns out that on Cygwin, you can't simply rename a
+# shared library after it has been created. Consequently, we can't
+# use this trick on Cygwin. This is probably not half as bad since
+# it's not commonly the case that Windows file system are remotely
+# mounted as it likely is on other systems.
 $(LIBDIR)/libdeal_II.g$(shared-lib-suffix): $(go-files) $(extra-g.o-files)
        @echo "=====deal.II==========debug======$(MT)== Linking library:   $(@F)"
        @rm -f $@ $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II.g)
-       @WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmpg.XXXXXXXXXX` && \
-               $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II.g) $(go-files) $(extra-g.o-files) $(deplibs.g) && \
-               mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II.g)
+       @case $(TARGET) in \
+               *cygwin*) \
+                       $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II.g) $(call DEAL_II_ADD_SONAME,deal_II.g) $(go-files) $(extra-g.o-files) $(deplibs.g) \
+                       ;; \
+               *) \
+                       WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmpg.XXXXXXXXXX` && \
+                       $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II.g) $(go-files) $(extra-g.o-files) $(deplibs.g) && \
+                       mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II.g) \
+                       ;; \
+        esac
        @ln -f -s $(call DEAL_II_SHLIB_NAME,deal_II.g) $@
 
 $(LIBDIR)/libdeal_II$(shared-lib-suffix): $(o-files) $(extra-o-files)
        @echo "=====deal.II==========optimized==$(MT)== Linking library:   $(@F)"
        @rm -f $@ $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II)
-       @WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmpo.XXXXXXXXXX` && \
-               $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II) $(o-files) $(extra-o-files) $(deplibs.o) && \
-               mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II)
+       @case $(TARGET) in \
+               *cygwin*) \
+                       $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II) $(call DEAL_II_ADD_SONAME,deal_II) $(o-files) $(extra-o-files) $(deplibs.o) \
+                       ;; \
+               *) \
+                       WORKFILE=`mktemp $${TMPDIR:-/tmp}/tmpo.XXXXXXXXXX` && \
+                       $(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $$WORKFILE $(call DEAL_II_ADD_SONAME,deal_II) $(o-files) $(extra-o-files) $(deplibs.o) && \
+                       mv $$WORKFILE $(LIBDIR)/$(call DEAL_II_SHLIB_NAME,deal_II) \
+                       ;; \
+        esac
        @ln -f -s $(call DEAL_II_SHLIB_NAME,deal_II) $@
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.