mkbuild

mk based build system
git clone git://git.2f30.org/mkbuild.git
Log | Files | Refs | LICENSE

commit ee09191b0bfaaec33c3d67c13a88a71b76cfe0d6
parent f2f6c0bda89c5df83ef8219b160a369387828667
Author: Daniel Bainton <dpb@driftaway.org>
Date:   Sun Apr 20 23:58:06 +0300

Support multiple targets per 3rdparty mkfile

Diffstat:
mk.3rdparty | 38+++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/mk.3rdparty b/mk.3rdparty @@ -7,29 +7,37 @@ build:QV: fetch mkdir -p $src oldpwd=`pwd` cd $src - t=$(cmp -s $mkfile $oldpwd/.cache || echo $?) - if test "$t" != ""; then - if test "${targ}" != ""; then - env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $mkfile TARG="${targ}" - else - env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $mkfile + for f in $mkfile; do + cachefile=$oldpwd/.cache-`basename $f` + t=$(cmp -s $f $cachefile || echo $?) + if test "$t" != ""; then + if test "${targ}" != ""; then + env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $f TARG="${targ}" + else + env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $f + fi + cp $f $cachefile fi - cp $mkfile $oldpwd/.cache - fi + done install:QV: all cd $src - if test "${targ}" != ""; then - env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $mkfile install TARG="${targ}" ROOT="${ROOT}" - else - env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $mkfile install ROOT="${ROOT}" - fi + for f in $mkfile; do + if test "${targ}" != ""; then + env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $f install TARG="${targ}" ROOT="${ROOT}" + else + env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $f install ROOT="${ROOT}" + fi + done clean:QV: - rm -f .cache + oldpwd=`pwd` if test -d $src; then cd $src - env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $mkfile clean + for f in $mkfile; do + rm -f $oldpwd/.cache-`basename $f` + env -i PATH="$PATH" configmk="$configmk" mkbuild="$mkbuild" mk -f $f clean + done fi distclean:QV: