1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-06-28 16:01:22 +00:00
morpheus/mkfile

41 lines
1.0 KiB
Plaintext
Raw Normal View History

2014-02-27 12:41:37 +00:00
<config.mk
allpkgs = `{ls pkgs/*}
pkgs = ${allpkgs:pkgs/%=%}
help:VQ:
2014-03-01 11:40:53 +00:00
printf 'Usage: mk pkg...\n'
2014-03-01 11:32:24 +00:00
printf '\nTo build all the targets in pkgs/, run `mk world´\n'
2014-02-27 12:41:37 +00:00
all world:VQ: $pkgs
clean:V:
2014-03-01 00:07:51 +00:00
rm -f .cache/* pkgs.mk
2014-02-27 12:41:37 +00:00
2014-03-01 14:43:39 +00:00
clean-all:V: clean
rm -rf ${root} src
2014-02-28 21:19:02 +00:00
fetchpkgs = ${pkgs:%=%-fetch}
fetch-all fetch-world:VQ: ${fetchpkgs}
2014-03-01 13:37:18 +00:00
# generate a pkgs.mk file with the targets for all packages in pkgs/
2014-02-28 12:36:16 +00:00
`{ mkdir -p src }
2014-03-01 00:07:51 +00:00
`{ mkdir -p .cache }
2014-03-01 11:57:08 +00:00
`{ printf '# auto-generated file, do not edit\n' > pkgs.mk }
2014-02-28 21:19:02 +00:00
`{ cd pkgs && for pkg in *; do cat $pkg ../stuff/fetch-pkg.mk |\
sed -e "s,^build:,$pkg:QP./stuff/cmp-pkgs: $pkg-fetch pkgs/$pkg," |\
sed -e "s,^fetch-target:,$pkg-fetch:," |\
sed -e "s,^v=,_${pkg}_v=," |\
sed -e "s,\$v,\${_${pkg}_v}," |\
sed -e "s,\$url,\${_${pkg}_url}," |\
sed -e "s, url=, _${pkg}_url=," |\
sed -e "s,\$git,\${_${pkg}_git}," |\
sed -e "s,^git=,_${pkg}_git=," |\
sed -e "s,^url=,_${pkg}_url=," >> ../pkgs.mk; done }
2014-02-27 12:41:37 +00:00
<pkgs.mk
bootable:V:
stuff/create-bootable "$root" morpheus-$arch-$version.img