mkports

recipes for building multiple softwares with mk(1)
git clone git://z3bra.org/mkports
Log | Files | Refs

commit d030a5c020b7a05ebfbb31d25363d4fec6567a59
parent a37dba44093064eed66caa71a06f9b6cde4ace6c
Author: z3bra <willyatmailoodotorg>
Date:   Sat Jan 23 14:23:01 2016

Add build dependency resolution

Pack dependencies are listed in deps.mk
To build a pack along with its dependencies, run "mk <pack>" from the
port tree. It will build all the dependencies recursively, and install
them in the $ROOT directory (defaults to the cross-compiler directory).
Once the pack is build, all dependencies are uninstalled from the $ROOT.

Diffstat:
 config.mk | 1 +
 deps.mk   | 5 +++++
 mkfile    | 8 +++++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/config.mk b/config.mk @@ -1,6 +1,7 @@ CROSS = /opt/cross/x86_64 PATH = ${CROSS}/bin:${PATH} TOOLCHAIN_TRIPLET = x86_64-linux-musl +ROOT = ${CROSS}/${TOOLCHAIN_TRIPLET} NPROC = 4 CC = ${TOOLCHAIN_TRIPLET}-gcc diff --git a/deps.mk b/deps.mk @@ -0,0 +1,5 @@ +curl:V: libressl +git:V: libz +libmpfr:V: libgmp +libmpc:V: libgmp libmpfr +libarchive:V: libz bzip2 gzip diff --git a/mkfile b/mkfile @@ -1,4 +1,7 @@ -ALL = `{ls | grep -vP 'config.mk|default.mk|mkfile'} +ALL = `{ls | grep -vP '[a-z]*\.mk|mkfile'} + +<config.mk +<deps.mk default:QV: echo "no default rule." @@ -14,9 +17,12 @@ all:QV: ${ALL} # the recipe will be executed one more time for the fake # target "command line arguments" %:V: + for d in $prereq; do pm -af $d/$d#*.tar.bz2; done cd $stem env -i PATH=$PATH mk env -i PATH=$PATH mk clean + for d in $prereq; do pm -d $d; done + clean:QV: for p in ${ALL}; do (cd $p; mk clean); done