diff options
author | William Pitcock <nenolod@dereferenced.org> | 2013-09-08 13:22:10 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2013-09-08 13:34:53 +0000 |
commit | 06486755943480bb707d811e7b380321d7b95f8e (patch) | |
tree | de30bcf8eee02d0166bfa4af1683aa7e16551629 /main/xen | |
parent | a17a579a91bee5f66a6f3ff0d782a5c23133c740 (diff) | |
download | aports-06486755943480bb707d811e7b380321d7b95f8e.tar.bz2 aports-06486755943480bb707d811e7b380321d7b95f8e.tar.xz |
main/xen: refactor build tasks and make them work independently as abuild steps
Diffstat (limited to 'main/xen')
-rw-r--r-- | main/xen/APKBUILD | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD index def6d7968..f330e0ce8 100644 --- a/main/xen/APKBUILD +++ b/main/xen/APKBUILD @@ -64,7 +64,22 @@ prepare() { unset LDFLAGS } -build() { +# Unset CFLAGS and LDFLAGS because the xen build system +# doesn't support them. Instead use .config in xen root +# folder if necessary. +munge_cflags() { + msg "Munging CFLAGS..." + + unset CFLAGS + unset LDFLAGS + unset LANG + unset LC_ALL +} + +# These tasks are added as separate tasks to enable a packager +# to invoke specific tasks like building the hypervisor. i.e. +# $ abuild configure build_tools +configure() { cd "$_builddir" msg "Running configure..." @@ -72,28 +87,46 @@ build() { --build=$CBUILD \ --host=$CHOST \ || return 1 +} - # Unset CFLAGS and LDFLAGS because the xen build system - # doesn't support them. Instead use .config in xen root - # folder if necessary. - unset CFLAGS - unset LDFLAGS - unset LANG - unset LC_ALL +build_hypervisor() { + munge_cflags msg "Building hypervisor..." make xen || return 1 +} + +build_tools() { + munge_cflags msg "Building tools..." make tools || return 1 +} + +build_docs() { + munge_cflags msg "Building documentation..." make docs || return 1 +} + +build_stubdom() { + munge_cflags msg "Building stub domains..." make stubdom || return 1 } +build() { + cd "$_builddir" + + configure + build_hypervisor + build_tools + build_docs + build_stubdom +} + package() { cd "$_builddir" |