2010-12-05 13:40:02 +01:00
|
|
|
#!/bin/sh
|
2016-12-11 17:30:12 +01:00
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
2021-08-28 10:25:05 +02:00
|
|
|
echo "*** meson build setup"
|
|
|
|
|
2016-12-11 17:30:12 +01:00
|
|
|
test -f mu/mu.cc || {
|
|
|
|
echo "*** Run this script from the top-level mu source directory"
|
|
|
|
exit 1
|
|
|
|
}
|
2021-08-28 10:25:05 +02:00
|
|
|
BUILDDIR=build
|
2019-07-12 13:45:00 +02:00
|
|
|
|
2021-08-28 10:25:05 +02:00
|
|
|
command -v meson 2> /dev/null
|
2018-01-25 04:30:04 +01:00
|
|
|
if [ $? != 0 ]; then
|
2021-08-28 10:25:05 +02:00
|
|
|
echo "*** No meson found, please install it ***"
|
2016-12-11 17:30:12 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-08-28 10:25:05 +02:00
|
|
|
# we could remove build/ but let's avoid rm -rf risks...
|
|
|
|
if test -d ${BUILDDIR}; then
|
2021-10-18 21:31:44 +02:00
|
|
|
meson --reconfigure ${BUILDDIR} $@
|
2016-12-11 17:30:12 +01:00
|
|
|
else
|
2021-08-28 10:25:05 +02:00
|
|
|
meson ${BUILDDIR} $@
|
2016-12-11 17:30:12 +01:00
|
|
|
fi
|
|
|
|
|
2021-08-28 10:25:05 +02:00
|
|
|
echo "*** Now run 'ninja -C ${BUILDDIR}' to build mu"
|
2021-09-04 09:41:07 +02:00
|
|
|
echo "*** Or check the Makefile for some useful targets"
|