rm -f conf.sdltest
])
+
dnl ---------------------------------------------------------------------------
dnl Support macros for makefiles generated by BAKEFILE.
dnl ---------------------------------------------------------------------------
esac
AC_MSG_RESULT([gcc])
elif test "x$MWCC" = "xyes"; then
- DEPSMODE=gcc
+ DEPSMODE=mwcc
DEPS_TRACKING=1
- DEPSFLAG_GCC="-MMD"
+ DEPSFLAG_MWCC="-MM"
AC_MSG_RESULT([mwcc])
else
AC_MSG_RESULT([none])
dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE
+dnl AC_BAKEFILE([autoconf_inc.m4 inclusion])
dnl
dnl To be used in configure.in of any project using Bakefile-generated mks
dnl
dnl BAKEFILE_HOST set this to override host detection, defaults
dnl to ${host}
dnl BAKEFILE_FORCE_PLATFORM set to override platform detection
+dnl
+dnl Example usage:
+dnl
+dnl AC_BAKEFILE([FOO(autoconf_inc.m4)])
+dnl
+dnl (replace FOO with m4_include above, aclocal would die otherwise)
+dnl (yes, it's ugly, but thanks to a bug in aclocal, it's the only thing
+dnl we can do...)
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE],
AC_BAKEFILE_DEPS
AC_BAKEFILE_RES_COMPILERS
- BAKEFILE_BAKEFILE_M4_VERSION="0.1.5"
-
- m4_include([autoconf_inc.m4])
+ BAKEFILE_BAKEFILE_M4_VERSION="0.1.6"
+
+ dnl includes autoconf_inc.m4:
+ $1
if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then
AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.])
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH],
[
dnl ===================== dllar.sh begins here =====================
+dnl (Created by merge-scripts.py from dllar.sh
+dnl file do not edit here!)
D='$'
cat <<EOF >dllar.sh
#!/bin/sh
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_DEPS],
[
dnl ===================== bk-deps begins here =====================
+dnl (Created by merge-scripts.py from bk-deps
+dnl file do not edit here!)
D='$'
cat <<EOF >bk-deps
#!/bin/sh
DEPSMODE=${DEPSMODE}
DEPSDIR=.deps
DEPSFLAG_GCC="${DEPSFLAG_GCC}"
+DEPSFLAG_MWCC="${DEPSFLAG_MWCC}"
mkdir -p ${D}DEPSDIR
fi
fi
exit 0
+elif test ${D}DEPSMODE = mwcc ; then
+ ${D}*
+ status=${D}?
+ if test ${D}{status} != 0 ; then
+ exit ${D}{status}
+ fi
+ # Run mwcc again with -MM and redirect into the dep file we want
+ # NOTE: We can't use shift here because we need ${D}* to be valid
+ prevarg=
+ for arg in ${D}* ; do
+ if test "${D}prevarg" = "-o"; then
+ objfile=${D}arg
+ else
+ case "${D}arg" in
+ -* )
+ ;;
+ * )
+ srcfile=${D}arg
+ ;;
+ esac
+ fi
+ prevarg="${D}arg"
+ done
+ ${D}* ${D}DEPSFLAG_MWCC >${D}{DEPSDIR}/${D}{objfile}.d
+ exit 0
else
${D}*
exit ${D}?
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH],
[
dnl ===================== shared-ld-sh begins here =====================
+dnl (Created by merge-scripts.py from shared-ld-sh
+dnl file do not edit here!)
D='$'
cat <<EOF >shared-ld-sh
#!/bin/sh
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH],
[
dnl ===================== bk-make-pch begins here =====================
+dnl (Created by merge-scripts.py from bk-make-pch
+dnl file do not edit here!)
D='$'
cat <<EOF >bk-make-pch
#!/bin/sh
EOF
dnl ===================== bk-make-pch ends here =====================
])
-
dnl
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl