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

26 lines
368 B
Plaintext
Raw Normal View History

2011-03-04 00:38:32 +00:00
#!/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