]> wimlib.net Git - wimlib/blobdiff - tools/make-windows-release
configure.ac: generate version number from git commit and tags
[wimlib] / tools / make-windows-release
index b21551192a16778ec4f44a8c85ad745d00b89510..5f5da584d9e9ad536fce974e5dcc97e0e33ff4c8 100755 (executable)
@@ -27,8 +27,7 @@ i686|x86_64)
        ;;
 esac
 
-VERSION=$(grep 'AC_INIT' configure.ac | \
-         grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+[^]]*')
+VERSION=$(tools/get-version-number)
 DESTDIR=wimlib-${VERSION}-windows-${ARCH}-bin
 ZIPFILE=wimlib-${VERSION}-windows-${ARCH}-bin.zip
 MAKE="make -j $(grep -c processor /proc/cpuinfo)"
@@ -43,7 +42,8 @@ fi
 
 # Compile wimlib
 
-if ! grep -q "./configure --host=${ARCH}-w64-mingw32" config.log || \
+if ! [ -e config.log ] ||
+       ! grep -q "./configure --host=${ARCH}-w64-mingw32" config.log || \
        ! grep -q "configure: exit 0" config.log || \
        [ $# -gt 0 ]
 then
@@ -54,11 +54,15 @@ then
        # Note: putting -static-libgcc in CC is a workaround for libtool
        # stripping it:
        # http://www.gnu.org/software/libtool/manual/libtool.html#Stripped-link-flags
+       #
+       # We also need to override the MinGW pkg-config with the "native" one in
+       # order for it to correctly restrict the include path to our $SYSROOT.
        ./configure --host=${ARCH}-w64-mingw32 --disable-static         \
                CC="${ARCH}-w64-mingw32-gcc -static-libgcc"             \
                CPPFLAGS="-I$SYSROOT/include"                           \
                LDFLAGS="-L$SYSROOT/lib"                                \
-               PKG_CONFIG_PATH="$SYSROOT/lib/pkgconfig"                \
+               PKG_CONFIG=pkg-config                                   \
+               PKG_CONFIG_LIBDIR="$SYSROOT/lib/pkgconfig"              \
                --without-libcrypto                                     \
                $extra_args "$@"
        $MAKE clean