Separate GCC and GNU Make detection (#2902)

Related to #2890.

This ensures when GNU Make is `make`, the `version.mak` file is used
regardless of `CC`.
This commit is contained in:
Winny 2019-11-12 03:19:19 -06:00 committed by Paulo Matos
parent 19411c0dec
commit 3cb41850fa
2 changed files with 14 additions and 4 deletions

View File

@ -4607,23 +4607,28 @@ if test "$ARFLAGS" = '' ; then
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} AR_FLAGS="'"'"${ARFLAGS}"'"'
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
# If using gcc, we want all warnings:
if test "$CC" = "gcc" ; then
COMPFLAGS="$COMPFLAGS -Wall"
# Use -MMD when we have gcc and gnumake:
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
if test "$is_gmake" = "" ; then
WX_MMD_FLAG=""
else
WX_MMD_FLAG="-MMD"
INCLUDEDEP="-include"
fi
# Compile mzdyn.o with -fPIC
DYN_CFLAGS="-fPIC"
fi
# When GNU Make is present, use version.mak
if test "$is_gmake" != ""; then
INCLUDEDEP="-include"
fi
if test "$REZ" = '' ; then
REZ=/Developer/Tools/Rez
fi

View File

@ -460,23 +460,28 @@ if test "$ARFLAGS" = '' ; then
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} AR_FLAGS="'"'"${ARFLAGS}"'"'
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
# If using gcc, we want all warnings:
if test "$CC" = "gcc" ; then
COMPFLAGS="$COMPFLAGS -Wall"
# Use -MMD when we have gcc and gnumake:
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
if test "$is_gmake" = "" ; then
WX_MMD_FLAG=""
else
WX_MMD_FLAG="-MMD"
INCLUDEDEP="-include"
fi
# Compile mzdyn.o with -fPIC
DYN_CFLAGS="-fPIC"
fi
# When GNU Make is present, use version.mak
if test "$is_gmake" != ""; then
INCLUDEDEP="-include"
fi
if test "$REZ" = '' ; then
REZ=/Developer/Tools/Rez
fi