]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Set CC to gcc by default.
authorAndre Noll <maan@systemlinux.org>
Mon, 2 Nov 2009 13:39:16 +0000 (14:39 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 2 Nov 2009 13:39:16 +0000 (14:39 +0100)
On systems where cc != gcc, compilation likely fails because we are
using quite some gccisms in osl. So default to gcc but let the user
override the default by setting CC manually.

The straight-forward CC ?= gcc does not work with gnu make as make
assigns CC the default value "cc".

Thanks to Steffen Schmidt for pointing out this shortcoming.

Makefile

index ef12cb86d577d7e98de1396dc01800c3e818f99b..76925a61c96b011da382e53b72ab3f8ac39f3b1b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,9 @@ executables := oslfsck
 man_pages := oslfsck.1
 
 INSTALL := install
-CC := gcc
+ifeq "$(origin CC)" "default"
+        CC := gcc
+endif
 MKDIR := mkdir -p
 RM := rm -f
 LN := ln