forked from lda/telodendria
Move to recipe-based make script, to allow for tests, releases, etc.
This commit is contained in:
parent
768430f614
commit
13a1fdecf9
1 changed files with 39 additions and 22 deletions
19
make.sh
19
make.sh
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
TELODENDRIA_VERSION="0.0.1"
|
||||
CVS_TAG="Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')"
|
||||
|
||||
HEADERS="-D_POSIX_C_SOURCE=199506L -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\""
|
||||
INCLUDES="-Isrc/include"
|
||||
|
@ -28,6 +29,7 @@ mod_time() {
|
|||
fi
|
||||
}
|
||||
|
||||
recipe_build() {
|
||||
mkdir -p build
|
||||
|
||||
do_rebuild=0
|
||||
|
@ -53,5 +55,20 @@ if [ $do_rebuild -eq 1 ] || [ ! -f "build/$PROG" ]; then
|
|||
else
|
||||
echo "Up to date."
|
||||
fi
|
||||
}
|
||||
|
||||
ls -lh "build/$PROG"
|
||||
recipe_clean() {
|
||||
rm -rv build
|
||||
}
|
||||
|
||||
recipe_test() {
|
||||
echo "Unit tests are not implemented yet."
|
||||
}
|
||||
|
||||
for recipe in $@; do
|
||||
recipe_$recipe
|
||||
done
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
recipe_build
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue