[Lunar-commits] r18048 - lunar/trunk/var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Mon Jan 9 17:43:58 UTC 2006


Author: sofar
Date: 2006-01-09 17:43:57 +0000 (Mon, 09 Jan 2006)
New Revision: 18048

Modified:
   lunar/trunk/var/lib/lunar/functions/build.lunar
Log:
* add /var/games as suggested in the ML
* add a _configure wrapper that skips the ./configure step if a Makefile is present but ./configure is missing (fallback operation). Bombs out when both are awol. Redirected all ./configure calls to _configure.


Modified: lunar/trunk/var/lib/lunar/functions/build.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/build.lunar	2006-01-09 17:17:37 UTC (rev 18047)
+++ lunar/trunk/var/lib/lunar/functions/build.lunar	2006-01-09 17:43:57 UTC (rev 18048)
@@ -147,57 +147,64 @@
 }
 
 
+# wrapper function to call ./configure
+_configure()
+{
+  debug_msg "_configure($@)"
+  if [ -e ./configure ]; then
+    verbose_msg "CFLAGS=\"$CFLAGS\""
+	verbose_msg "LDFLAGS=\"$LDFLAGS\""
+    verbose_msg "./configure $@"
+    ./configure $@
+  elif [ -e Makefile -o -e makefile ]; then
+    verbose_msg "Missing \"configure\": skipping configure stage."
+  else
+    error_msg "${PROBLEM_COLOR}Missing ${FILE_COLOR}configure${PROBLEM_COLOR} and/or ${FILE_COLOR}Makefile${PROBLEM_COLOR}!${DEFAULT_COLOR}"
+    return 1
+  fi
+}
+
+
 default_config() {
   debug_msg "default_config ($@)"
   verbose_msg "running \"default_config\""
-
-  verbose_msg "CFLAGS=\"$CFLAGS\""            &&
-  verbose_msg "OPTS=\"$OPTS\""                &&
-  verbose_msg "./configure --build=$BUILD --prefix=$MODULE_PREFIX --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
-
-  ./configure  --build=$BUILD                      \
-               --prefix=$MODULE_PREFIX             \
-               --sysconfdir=/etc                   \
-               --localstatedir=/var                \
-               --infodir=$MODULE_PREFIX/share/info \
-               --mandir=$MODULE_PREFIX/share/man   \
-               $OPTS
+  _configure  --build=$BUILD                      \
+              --prefix=$MODULE_PREFIX             \
+              --sysconfdir=/etc                   \
+              --localstatedir=/var                \
+              --infodir=$MODULE_PREFIX/share/info \
+              --mandir=$MODULE_PREFIX/share/man   \
+              $OPTS
 } > $C_FIFO 2>&1
 
 
 default_game_config() {
   debug_msg "default_game_config ($@)"
   verbose_msg "running \"default_game_config\""
-  verbose_msg "CFLAGS=\"$CFLAGS\""            &&
-  verbose_msg "OPTS=\"$OPTS\""                &&
-  verbose_msg "./configure --build=$BUILD --prefix=$MODULE_PREFIX --bindir=$MODULE_PREFIX/games --datadir=$MODULE_PREFIX/share/games --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
-
-  ./configure  --build=$BUILD                       \
-               --prefix=$MODULE_PREFIX              \
-               --bindir=$MODULE_PREFIX/games        \
-               --datadir=$MODULE_PREFIX/share/games \
-               --sysconfdir=/etc                    \
-               --localstatedir=/var                 \
-               --infodir=$MODULE_PREFIX/share/info  \
-               --mandir=$MODULE_PREFIX/share/man    \
-               $OPTS
+  _configure  --build=$BUILD                       \
+              --prefix=$MODULE_PREFIX              \
+              --bindir=$MODULE_PREFIX/games        \
+              --datadir=$MODULE_PREFIX/share/games \
+              --sysconfdir=/etc                    \
+              --localstatedir=/var/games           \
+              --infodir=$MODULE_PREFIX/share/info  \
+              --mandir=$MODULE_PREFIX/share/man    \
+              $OPTS
 } > $C_FIFO 2>&1
 
 
 default_cvs_config() {
   debug_msg "default_cvs_config ($@)"
   verbose_msg "running \"default_cvs_config\""
-  verbose_msg "CFLAGS=\"$CFLAGS\""            &&
-  verbose_msg "OPTS=\"$OPTS\""                &&
-  verbose_msg "./autogen.sh --build=$BUILD --prefix=$MODULE_PREFIX --sysconfdir=/etc --localstatedir=/var --infodir=$MODULE_PREFIX/share/info --mandir=$MODULE_PREFIX/share/man $OPTS"
 
-  ./autogen.sh --build=$BUILD                      \
-               --prefix=$MODULE_PREFIX             \
-               --sysconfdir=/etc                   \
-               --localstatedir=/var                \
-               --infodir=$MODULE_PREFIX/share/info \
-               --mandir=$MODULE_PREFIX/share/man   \
-               $OPTS
+  ./autogen.sh                                    &&
+  _configure  --build=$BUILD                      \
+              --prefix=$MODULE_PREFIX             \
+              --sysconfdir=/etc                   \
+              --localstatedir=/var                \
+              --infodir=$MODULE_PREFIX/share/info \
+              --mandir=$MODULE_PREFIX/share/man   \
+              $OPTS
 } > $C_FIFO 2>&1
 
 
@@ -209,6 +216,7 @@
   make install
 } > $C_FIFO 2>&1
 
+
 default_game_build() {
   debug_msg "default_game_build ($@)"
   verbose_msg "running \"default_game_build\""
@@ -216,6 +224,7 @@
   default_make
 } > $C_FIFO 2>&1
 
+
 default_build() {
   debug_msg "default_build ($@)"
   verbose_msg "running \"default_build\""



More information about the Lunar-commits mailing list