[Lunar-commits] <lunar> Start of the split BUILD code.
Auke Kok
sofar at foo-projects.org
Sun Jun 24 01:14:30 CEST 2012
commit cef5e5efa9d29d6e39da7c1c16f33db8712d2e46
Author: Auke Kok <sofar at foo-projects.org>
Date: Sat Jun 23 16:14:30 2012 -0700
Start of the split BUILD code.
This is all mostly proto code. I suspect things like the game/cvs/cmake
stuff to be broken.
tested on wget/lftp/ccache and a few others.
---
libs/build.lunar | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/libs/build.lunar b/libs/build.lunar
index c3573bb..7dfcdd6 100644
--- a/libs/build.lunar
+++ b/libs/build.lunar
@@ -236,9 +236,9 @@ default_cmake_config() {
default_make() {
debug_msg "default_make ($@)"
verbose_msg "running \"default_make\""
- make ${MAKES:+-j${MAKES}} &&
+ default_compile &&
prepare_install &&
- make install
+ default_install
}
@@ -266,6 +266,21 @@ default_build() {
}
+default_compile() {
+ debug_msg "default_compile ($@)"
+ verbose_msg "running \"default_compile\""
+ default_config &&
+ make ${MAKES:+-j${MAKES}}
+}
+
+
+default_install() {
+ debug_msg "default_install ($@)"
+ verbose_msg "running \"default_install\""
+ make install
+}
+
+
default_cvs_build() {
debug_msg "default_cvs_build ($@)"
default_cvs_config &&
@@ -414,9 +429,21 @@ run_build() {
# fix errors, don't avoid them. This makes all errors fatal
shopt -s execfail
if has_module_file $MODULE BUILD ; then
+ # this MUST call `prepare_install` !!!
run_module_file $MODULE BUILD
else
- default_build
+ # split build code hooks in here:
+ if has_module_file $MODULE COMPILE ; then
+ run_module_file $MODULE COMPILE
+ else
+ default_compile
+ fi
+ prepare_install &&
+ if has_module_file $MODULE INSTALL ; then
+ run_module_file $MODULE INSTALL
+ else
+ default_install
+ fi
fi
) > $C_FIFO 2>&1
}
More information about the Lunar-commits
mailing list