tdefault.mk: use - mkports - recipes for building multiple softwares with mk(1)
 (HTM) git clone git://z3bra.org/mkports
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit ad1ebdeb759b7275420b14455301d339688f0958
 (DIR) parent 32636d1950d8821b85d2df9f7f6c43cb91837826
 (HTM) Author: z3bra <willyatmailoodotorg>
       Date:   Wed, 20 Jan 2016 11:58:17 +0100
       
       default.mk: use
       
       Diffstat:
         M config.mk                           |       1 +
         M default.mk                          |      20 ++++++++------------
       
       2 files changed, 9 insertions(+), 12 deletions(-)
       ---
 (DIR) diff --git a/config.mk b/config.mk
       t@@ -15,6 +15,7 @@ CBUILD    = ${TOOLCHAIN_TRIPLET}
        CPPFLAGS  =
        CFLAGS    = ${CPPFLAGS}
        LDFLAGS   = -static
       +MAKEFLAGS = -j4 PREFIX= MANDIR=/man MANPREFIX=/man
        CONFIGURE = --prefix= \
                    --build=${CBUILD} \
                    --host=${CHOST} \
 (DIR) diff --git a/default.mk b/default.mk
       t@@ -9,24 +9,20 @@ $pkg\#$ver.tar.bz2:Q: fetch patch build install cleanup
        # building
        # If it doesn't work, simply override it on a per pack basis
        build:QV: fetch patch
       -        if [ ! -d $destdir ]; then
       -                cd $pkg-$ver
       -                test -f configure && ./configure $CONFIGURE
       -                make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
       -        fi
       +        cd $pkg-$ver
       +        test -f configure && ./configure $CONFIGURE
       +        make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${MAKEFLAGS}
        
        # install the pack to a .rootfs directory
        # this is where the "pack" target will chdir to create the pack
        install:QV: build
       -        if [ ! -d $destdir ]; then
       -                mkdir -p $destdir
       -                cd $pkg-$ver
       -                make PREFIX= DESTDIR=$destdir install
       -        fi
       +        mkdir -p $destdir
       +        cd $pkg-$ver
       +        make ${MAKEFLAGS} DESTDIR=$destdir install
        
        cleanup:QV: install
                cd $destdir
       -        find . -name '*.la' -delete
       +        find . -name '*.la' -o -name '*.so' -o -name '*.so.*' -delete
                find . -name 'info' -type d -exec rm -r {} +
                find . -name 'doc' -type d -exec rm -r {} +
                find . -name 'pkgconfig' -type d -exec rm -r {} +
       t@@ -36,7 +32,7 @@ cleanup:QV: install
        
        # patch your software using everything in ./patches
        patch:QV: fetch
       -        if [ ! -d $destdir ] && [ -d ./patches ]; then
       +        if [ -d ./patches ]; then
                        cd $pkg-$ver
                        cat ../patches/*.diff | patch -Np1
                fi