mkbuild

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

commit 4e8d085ee822fe1c56c7f96bc6b886d10bc1743f
parent b0a6e5c76ef56abb4977ba53767b0a2407b80436
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 28 Apr 2014 11:53:03 +0000

remove return, doesnt work in bash and some other shells

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mmk.3rdparty | 1-
Mmk.fetch | 19++++++++-----------
Mmk.install | 20++++++++------------
3 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/mk.3rdparty b/mk.3rdparty @@ -1,7 +1,6 @@ <$mkbuild/mk.config all:QV: build - build:QV: fetch mkdir -p $src diff --git a/mk.fetch b/mk.fetch @@ -1,18 +1,15 @@ - fetch:QV: fetch-git fetch-http fetch-git:QV: - if test x"$git" = x""; then - return - fi - if test x"$branch" = x""; then - branch=master + if ! test x"$git" = x""; then + if test x"$branch" = x""; then + branch=master + fi + test -d $src || git clone --depth 1 -b $branch $git $src fi - test -d $src || git clone --depth 1 -b $branch $git $src fetch-http:QV: - if test x"$url" = x""; then - return + if ! test x"$url" = x""; then + wget -c $url + tar -xf `basename $url` fi - wget -c $url - tar -xf `basename $url` diff --git a/mk.install b/mk.install @@ -1,12 +1,10 @@ - install:QV: install_bin install_lib install_man install_other \ install_dirs install_symlinks - if test "$INSTALL_PERMISSIONS" = ""; then - return + if ! test "$INSTALL_PERMISSIONS" = ""; then + eval `echo $INSTALL_PERMISSIONS | tr ' ' '\n' | paste -d ' ' - - | \ + awk '{ printf("echo \"CHMOD %s ${ROOT}${PREFIX}%s\"; \ + chmod %s ${ROOT}${PREFIX}%s;\n", $1, $2, $1, $2) }'` fi - eval `echo $INSTALL_PERMISSIONS | tr ' ' '\n' | paste -d ' ' - - | \ - awk '{ printf("echo \"CHMOD %s ${ROOT}${PREFIX}%s\"; \ - chmod %s ${ROOT}${PREFIX}%s;\n", $1, $2, $1, $2) }'` install_bin:QV: all for f in $INSTALL_BIN; do @@ -57,10 +55,8 @@ install_other:QV: all done install_symlinks:QV: all - if test "$INSTALL_SYMLINK" = ""; then - return + if ! test "$INSTALL_SYMLINK" = ""; then + eval `echo $INSTALL_SYMLINK | tr ' ' '\n' | paste -d ' ' - - | \ + awk '{ printf("echo \"LN %s ${ROOT}${PREFIX}%s\"; \ + ln -sf %s ${ROOT}${PREFIX}%s;\n", $1, $2, $1, $2) }'` fi - eval `echo $INSTALL_SYMLINK | tr ' ' '\n' | paste -d ' ' - - | \ - awk '{ printf("echo \"LN %s ${ROOT}${PREFIX}%s\"; \ - ln -sf %s ${ROOT}${PREFIX}%s;\n", $1, $2, $1, $2) }'` -