Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add in a script to filter out duplicate libraries; only take the firs…

…t found one
  • Loading branch information...
commit 8594140cf332aabf35dcebc8de22e1a4b6653268 1 parent c192258
@staticfloat staticfloat authored
View
17 contrib/filterDupLibs.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+libnames=""
+libpaths=""
+
+# Loop over all command line arguments
+for i in "$@"; do
+ # Get basename of this argument, check if it is already in libnames
+ name=$(basename "$i")
+
+ if [[ -z $(echo $libnames | grep "$name") ]]; then
+ libnames+="$name "
+ libpaths+="$i "
+ fi
+done
+
+echo $libpaths
View
2  contrib/repackage_system_suitesparse4.make
@@ -10,7 +10,7 @@ default:
mkdir -p $(JULIAHOME)/deps/SuiteSparse-SYSTEM/lib
cd $(JULIAHOME)/deps/SuiteSparse-SYSTEM/lib && \
rm -f *.a && \
- cp -f $(shell find $(shell eval $(JULIAHOME)/contrib/filterArgs.sh $(LDFLAGS)) /lib /usr/lib /usr/local/lib -name libamd.a -o -name libcolamd.a -o -name libcholmod.a -o -name libumfpack.a -o -name libspqr.a -o -name libsuitesparseconfig.a 2>/dev/null) . && \
+ cp -f $(shell eval $(JULIAHOME)/contrib/filterDupLibs.sh $(shell find $(shell eval $(JULIAHOME)/contrib/filterArgs.sh $(LDFLAGS)) /lib /usr/lib /usr/local/lib -name libamd.a -o -name libcolamd.a -o -name libcholmod.a -o -name libumfpack.a -o -name libspqr.a -o -name libsuitesparseconfig.a 2>/dev/null)) . && \
$(CC) -shared $(WHOLE_ARCHIVE) libamd.a $(NO_WHOLE_ARCHIVE) -o $(BUILD)/$(JL_LIBDIR)/libamd.$(SHLIB_EXT) && \
$(INSTALL_NAME_CMD)libamd.$(SHLIB_EXT) $(BUILD)/$(JL_LIBDIR)/libamd.$(SHLIB_EXT) && \
$(CC) -shared $(WHOLE_ARCHIVE) libcolamd.a $(NO_WHOLE_ARCHIVE) -o $(BUILD)/$(JL_LIBDIR)/libcolamd.$(SHLIB_EXT) && \
Please sign in to comment.
Something went wrong with that request. Please try again.