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."
...@@ -181,7 +188,6 @@ case $HOST in ...@@ -181,7 +188,6 @@ case $HOST in
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
...@@ -189,6 +195,13 @@ case $HOST in ...@@ -189,6 +195,13 @@ case $HOST in
# Default Unix-like systems # Default Unix-like systems
cat src/Distributions/unix.mak >> distro.mak cat src/Distributions/unix.mak >> distro.mak
fi 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
;; ;;
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