apenwarr-redo/docs/cookbook/c/allconfig.do
Avery Pennarun 6dae51f4d2 Experimental new redoconf C/C++ build/autoconfiguration system.
To test it out, try this:
	./do -j10 build
	cd docs/cookbook/c
	redo -j10 test

It should detect all the compilers on your system and make three
separate builds for each one: normal, debug, and optimized.  Then it
tries to run a test program under each one.

If there are windows cross compilers and you also have 'wine'
installed, it'll try running the test program under wine as well.

redoconf currently has no documentation other than the example program.
We'll fix that later.
2019-02-23 06:52:25 -05:00

27 lines
475 B
Text

redo-ifchange arches configure redoconf/utils.sh
config() {
local dir="$1" arch="$2"
shift
shift
[ -d "$dir" ] || mkdir "$dir"
(
cd "$dir" &&
../configure --host="$arch" "$@" &&
redo-ifchange rc/CC.rc &&
echo "$dir"
) || :
}
for d in $(cat arches); do
if [ "$d" = "native" ]; then
arch=""
else
arch="$d"
fi
config "out.$d" "$arch" &
config "out.$d.static" "$arch" "--enable-static" &
config "out.$d.opt" "$arch" "--enable-optimization" &
done
wait