From c55a8a73a483305c7c9a7bcc7191dd7c833f873d Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sat, 24 Jul 2010 12:05:34 +0100 Subject: Cygwin: Teach mklib/minstall to properly install libraries on cygwin Teach mklib/minstall more about cygwin so libraries are properly installed Have mklib install the .dll into the lib/ staging directory as well Have minstall install the .dll into PREFIX/bin at the same time as installing the .dll.a link library into PREFIX/lib mklib uses a '-' rather than a '.' as the separator before the version number in library names on cygwin. Change the install globs so they match library names like that. Signed-off-by: Jon TURNEY Signed-off-by: Brian Paul --- bin/minstall | 21 ++++++++++++++++++++- bin/mklib | 5 +++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/minstall b/bin/minstall index 130025829ba..094ec0c2b2a 100755 --- a/bin/minstall +++ b/bin/minstall @@ -31,7 +31,7 @@ if [ $# -ge 2 ] ; then # Last cmd line arg is the dest dir for FILE in $@ ; do - DEST="$FILE" + DESTDIR="$FILE" done # Loop over args, moving them to DEST directory @@ -42,6 +42,25 @@ if [ $# -ge 2 ] ; then exit 0 fi + DEST=$DESTDIR + + # On CYGWIN, because DLLs are loaded by the native Win32 loader, + # they are installed in the executable path. Stub libraries used + # only for linking are installed in the library path + case `uname` in + CYGWIN*) + case $FILE in + *.dll) + DEST="$DEST/../bin" + ;; + *) + ;; + esac + ;; + *) + ;; + esac + PWDSAVE=`pwd` # determine file's type diff --git a/bin/mklib b/bin/mklib index 5478ef72c86..bc554c15637 100755 --- a/bin/mklib +++ b/bin/mklib @@ -1019,4 +1019,9 @@ if [ ${INSTALLDIR} != "." ] ; then echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR} mv ${FINAL_LIBS} ${INSTALLDIR}/ + + if [ "x${FINAL_BINS}" != "x" ] ; then + echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR} + mv ${FINAL_BINS} ${INSTALLDIR}/ + fi fi -- cgit v1.2.3