aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2013-09-08 13:22:10 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2013-09-08 13:34:53 +0000
commit06486755943480bb707d811e7b380321d7b95f8e (patch)
treede30bcf8eee02d0166bfa4af1683aa7e16551629
parenta17a579a91bee5f66a6f3ff0d782a5c23133c740 (diff)
downloadalpine_aports-06486755943480bb707d811e7b380321d7b95f8e.tar.bz2
alpine_aports-06486755943480bb707d811e7b380321d7b95f8e.tar.xz
alpine_aports-06486755943480bb707d811e7b380321d7b95f8e.zip
main/xen: refactor build tasks and make them work independently as abuild steps
-rw-r--r--main/xen/APKBUILD49
1 files changed, 41 insertions, 8 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index def6d7968e..f330e0ce8f 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -64,7 +64,22 @@ prepare() {
64 unset LDFLAGS 64 unset LDFLAGS
65} 65}
66 66
67build() { 67# Unset CFLAGS and LDFLAGS because the xen build system
68# doesn't support them. Instead use .config in xen root
69# folder if necessary.
70munge_cflags() {
71 msg "Munging CFLAGS..."
72
73 unset CFLAGS
74 unset LDFLAGS
75 unset LANG
76 unset LC_ALL
77}
78
79# These tasks are added as separate tasks to enable a packager
80# to invoke specific tasks like building the hypervisor. i.e.
81# $ abuild configure build_tools
82configure() {
68 cd "$_builddir" 83 cd "$_builddir"
69 84
70 msg "Running configure..." 85 msg "Running configure..."
@@ -72,28 +87,46 @@ build() {
72 --build=$CBUILD \ 87 --build=$CBUILD \
73 --host=$CHOST \ 88 --host=$CHOST \
74 || return 1 89 || return 1
90}
75 91
76 # Unset CFLAGS and LDFLAGS because the xen build system 92build_hypervisor() {
77 # doesn't support them. Instead use .config in xen root 93 munge_cflags
78 # folder if necessary.
79 unset CFLAGS
80 unset LDFLAGS
81 unset LANG
82 unset LC_ALL
83 94
84 msg "Building hypervisor..." 95 msg "Building hypervisor..."
85 make xen || return 1 96 make xen || return 1
97}
98
99build_tools() {
100 munge_cflags
86 101
87 msg "Building tools..." 102 msg "Building tools..."
88 make tools || return 1 103 make tools || return 1
104}
105
106build_docs() {
107 munge_cflags
89 108
90 msg "Building documentation..." 109 msg "Building documentation..."
91 make docs || return 1 110 make docs || return 1
111}
112
113build_stubdom() {
114 munge_cflags
92 115
93 msg "Building stub domains..." 116 msg "Building stub domains..."
94 make stubdom || return 1 117 make stubdom || return 1
95} 118}
96 119
120build() {
121 cd "$_builddir"
122
123 configure
124 build_hypervisor
125 build_tools
126 build_docs
127 build_stubdom
128}
129
97package() { 130package() {
98 cd "$_builddir" 131 cd "$_builddir"
99 132