]> gitweb.factorcode.org Git - factor.git/commitdiff
Use $CC and $CPP if provided
authorThomas Deniau <thomas@glamdring.nousoft.org>
Fri, 19 Jun 2009 14:34:00 +0000 (16:34 +0200)
committerThomas Deniau <thomas@deniau.org>
Fri, 19 Jun 2009 16:29:00 +0000 (18:29 +0200)
Let the user select the compiler he wants to use to compile Factor
by using the supplied $CC and $CPP instead of just discarding them.
If not present, we default to gcc and g++ (the current behaviour).

Makefile
build-support/factor.sh

index 18cb7d15c7da0ca69edc4f878df6a46b66962535..50cef84a212e6e2a0a44de387aafecee6b9ff3cf 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-CC = gcc
-CPP = g++
+CC ?= gcc
+CPP ?= g++
 AR = ar
 LD = ld
 
index d5b8bd5411c7e3c10b4c6bacb3a378174d640507..e059a7d84f69ecfaad647da3be13c626b0138be0 100755 (executable)
@@ -97,7 +97,7 @@ set_md5sum() {
 set_gcc() {
     case $OS in
         openbsd) ensure_program_installed egcc; CC=egcc;;
-        *) CC=gcc;;
+        *) CC=${CC:=gcc};;
     esac
 }