mirror of
git://git.2f30.org/morpheus.git
synced 2024-06-28 15:51:21 +00:00
817a34ef0b
When using mk, cp config.def.mk to config.mk if it doesn't exist. Easier to pull changes to the tree, when config.mk doesn't all the time complain about changes.
34 lines
648 B
Makefile
34 lines
648 B
Makefile
top = `{pwd}
|
||
`{ test -e config.mk || cp config.def.mk config.mk }
|
||
<config.mk
|
||
|
||
allpkgs = `{ls -d pkgs/*}
|
||
pkgs = ${allpkgs:pkgs/%=%}
|
||
|
||
help:VQ:
|
||
printf 'Usage: mk pkg...\n'
|
||
printf '\nTo build all the targets in pkgs/, run `mk world´\n'
|
||
|
||
all world:VQ: $pkgs
|
||
|
||
clean:V:
|
||
rm -f .cache/* pkgs.mk
|
||
|
||
clean-all clean-world:V: clean
|
||
rm -rf ${root} src
|
||
|
||
fetchpkgs = ${pkgs:%=%-fetch}
|
||
|
||
fetch-all fetch-world:VQ: ${fetchpkgs}
|
||
|
||
`{ mkdir -p src }
|
||
`{ mkdir -p .cache }
|
||
|
||
# generate a pkgs.mk file with the targets for all packages in pkgs/
|
||
`{ stuff/generate-pkgs.sh pkgs > pkgs.mk }
|
||
|
||
<pkgs.mk
|
||
|
||
bootable:V:
|
||
stuff/create-bootable "$root" morpheus-$arch-$version.img
|