Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
controller/build
2011-03-03 16:38:32 -08:00

26 lines
368 B
Bash
Executable File

#!/bin/bash
#| Cleaner builder script, than plain usage of the Makefile
dir="Build"
#| If directory doesn't exist
if [ ! -d $dir ]; then
mkdir -p $dir
for file in {Makefile,*.c,*.h}; do
ln -s "`pwd`/$file" $dir/.
done
fi
cd $dir
make "$@"
cd $OLDPWD
#| On make clean, make it really clean
if [ "${1}" = "clean" ]; then
rm -r $dir
echo "Cleaned"
fi
exit 0