Commit dde6aaf8 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Make it possible to force a distro.mak to use. This is helpfull in...

Make it possible to force a distro.mak to use. This is helpfull in cross-compile situations to distinquish for a known target.
parent 3c734743
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
# *************************************************************************** # ***************************************************************************
if test "$#" -gt "1"; then if test "$#" -gt "2"; then
echo "Usage: $0 <host>" >&2 echo "Usage: $0 <host> [distro]" >&2
echo " Prepare config.mak file." >&2 echo " Prepare config.mak and distro.mak file." >&2
exit 1 exit 1
fi fi
...@@ -42,6 +42,13 @@ else ...@@ -42,6 +42,13 @@ else
HOST="$BUILD" HOST="$BUILD"
fi fi
DISTRO=
if test "$#" = "2"; then
echo "Forcing distro.mak to use $2.mak"
DISTRO="$2"
HOST="$1"
fi
rm -f config.mak rm -f config.mak
{ {
echo "# Automatically generated by bootstrap." echo "# Automatically generated by bootstrap."
...@@ -83,7 +90,7 @@ case $HOST in ...@@ -83,7 +90,7 @@ case $HOST in
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak cat src/Distributions/darwin.mak >> distro.mak
;; ;;
i686-apple-darwin8) i686-apple-darwin8)
SDK_TARGET=10.4 SDK_TARGET=10.4
...@@ -96,7 +103,7 @@ case $HOST in ...@@ -96,7 +103,7 @@ case $HOST in
EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak cat src/Distributions/darwin.mak >> distro.mak
;; ;;
powerpc-apple-darwin9) powerpc-apple-darwin9)
SDK_TARGET=10.4 SDK_TARGET=10.4
...@@ -108,7 +115,7 @@ case $HOST in ...@@ -108,7 +115,7 @@ case $HOST in
# EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" # EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
# EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" # EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak cat src/Distributions/darwin.mak >> distro.mak
;; ;;
i686-apple-darwin9) i686-apple-darwin9)
SDK_TARGET=10.4 SDK_TARGET=10.4
...@@ -121,7 +128,7 @@ case $HOST in ...@@ -121,7 +128,7 @@ case $HOST in
# EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}" # EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
# EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}" # EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
cat src/Distributions/darwin.mak >> distro.mak cat src/Distributions/darwin.mak >> distro.mak
;; ;;
i586-pc-beos) i586-pc-beos)
echo "HAVE_BEOS = 1" >> config.mak echo "HAVE_BEOS = 1" >> config.mak
...@@ -173,21 +180,27 @@ case $HOST in ...@@ -173,21 +180,27 @@ case $HOST in
;; ;;
*) *)
if test "$HOST" = "$BUILD"; then if test "$HOST" = "$BUILD"; then
if test -d "/usr/lib/pkgconfig"; then if test -d "/usr/lib/pkgconfig"; then
if test -z "$PKG_CONFIG_PATH"; then if test -z "$PKG_CONFIG_PATH"; then
echo "PKG_CONFIG_PATH = /usr/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_PATH = /usr/lib/pkgconfig" >> config.mak
fi fi
if test -z "$PKG_CONFIG_LIBDIR"; then if test -z "$PKG_CONFIG_LIBDIR"; then
echo "PKG_CONFIG_LIBDIR = /usr/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_LIBDIR = /usr/lib/pkgconfig" >> config.mak
fi fi
fi fi
fi # Try to match distribution
# Try to match distribution if test -f /etc/fedora-release; then
if test -f /etc/fedora-release; then cat src/Distributions/fedora.mak >> distro.mak
cat src/Distributions/fedora.mak >> distro.mak else
else # Default Unix-like systems
# Default Unix-like systems cat src/Distributions/unix.mak >> distro.mak
cat src/Distributions/unix.mak >> distro.mak fi
else # unknown distro
if test ! -z "${DISTRO}"; then
cat src/Distributions/${DISTRO}.mak >> distro.mak
else
cat src/Distributions/unix.mak >> distro.mak
fi
fi fi
;; ;;
esac esac
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment