morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus
Log | Files | Refs | Submodules | README | LICENSE

commit 6ea89344d5f9b58c560f7939672875529012b7c1
parent 14903be1bddf3b52ed30737f23701284492ea6ab
Author: Daniel Bainton <dpb@driftaway.org>
Date:   Sun, 30 Mar 2014 00:22:33 +0000

Add cache support

Diffstat:
Mbuild/mk.3rdparty | 14++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/build/mk.3rdparty b/build/mk.3rdparty @@ -5,11 +5,16 @@ all:QV: build build:QV: fetch mkdir -p $src + oldpwd=`pwd` cd $src - if test "${targ}" != ""; then - env -i PATH="$PATH" mkbuild="$mkbuild" TARG="${targ}" mk -f $mkfile - else - env -i PATH="$PATH" mkbuild="$mkbuild" mk -f $mkfile + t=$(cmp -s $mkfile $oldpwd/.cache || echo $?) + if test "$t" != ""; then + if test "${targ}" != ""; then + env -i PATH="$PATH" mkbuild="$mkbuild" TARG="${targ}" mk -f $mkfile + else + env -i PATH="$PATH" mkbuild="$mkbuild" mk -f $mkfile + fi + cp $mkfile $oldpwd/.cache fi install:QV: all @@ -21,6 +26,7 @@ install:QV: all fi clean:QV: + rm -f .cache if test -d $src; then cd $src env -i PATH="$PATH" mkbuild="$mkbuild" mk -f $mkfile clean