]> mj.ucw.cz Git - moe.git/commitdiff
Use per-extension overrides for setting of compilation commands.
authorMartin Mares <mj@ucw.cz>
Sun, 3 Feb 2008 22:29:03 +0000 (23:29 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 3 Feb 2008 22:29:03 +0000 (23:29 +0100)
WARNING: The COMP_xxx variables are no longer usable.

bin/lib
config

diff --git a/bin/lib b/bin/lib
index a84258cb162aeed79730d40d4701e361063350bf..981b01002a93e3ae4544d19285786059732d5148 100644 (file)
--- a/bin/lib
+++ b/bin/lib
@@ -178,8 +178,7 @@ function compile
        box-clean
        for a in $SRC $COMP_EXTRAS ; do cp $TDIR/$a $BOXDIR/ ; done
        EXE=$PROBLEM
-       CCMD=COMP_$SRCEXT
-       CCMD=`eval echo ${!CCMD}`
+       CCMD=`eval echo $COMP`
        COMP_SANDBOX_OPTS=`eval echo $COMP_SANDBOX_OPTS`
        echo "Compiler command: $CCMD"
        echo "Compiler sandbox options: $COMP_SANDBOX_OPTS"
diff --git a/config b/config
index 75f876492d20ec31e2f960fb478e217e060193de..806bdd9560fc2eec2635aa124bd892ae78a40116 100644 (file)
--- a/config
+++ b/config
@@ -47,12 +47,13 @@ EXTRA_CFLAGS=
 EXTRA_PFLAGS=
 
 # For each source extension, we must give compiler command
-COMP_c='/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
-COMP_C='/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
-COMP_cpp="$COMP_C"
-COMP_cc="$COMP_C"
-COMP_p='/usr/bin/fpc -Ci -Cr -Ct -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC'
-COMP_pas="$COMP_p"
+COMP=false
+EXT_c_COMP='/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
+EXT_C_COMP='/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
+EXT_cpp_COMP="$EXT_C_COMP"
+EXT_cc_COMP="$EXT_C_COMP"
+EXT_p_COMP='/usr/bin/fpc -Ci -Cr -Ct -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC'
+EXT_pas_COMP="$EXT_p_COMP"
 
 # Sandbox options used when compiling
 COMP_SANDBOX_OPTS='-m262144 -w60 -e -i/dev/null'