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 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
# ***************************************************************************
if test "$#" -gt "1"; then
echo "Usage: $0 <host>" >&2
echo " Prepare config.mak file." >&2
if test "$#" -gt "2"; then
echo "Usage: $0 <host> [distro]" >&2
echo " Prepare config.mak and distro.mak file." >&2
exit 1
fi
......@@ -42,6 +42,13 @@ else
HOST="$BUILD"
fi
DISTRO=
if test "$#" = "2"; then
echo "Forcing distro.mak to use $2.mak"
DISTRO="$2"
HOST="$1"
fi
rm -f config.mak
{
echo "# Automatically generated by bootstrap."
......@@ -181,7 +188,6 @@ case $HOST in
echo "PKG_CONFIG_LIBDIR = /usr/lib/pkgconfig" >> config.mak
fi
fi
fi
# Try to match distribution
if test -f /etc/fedora-release; then
cat src/Distributions/fedora.mak >> distro.mak
......@@ -189,6 +195,13 @@ case $HOST in
# Default Unix-like systems
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
;;
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