[07/14] batctl: Only define CC when not already specified

Message ID 1305980898-30494-7-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit 8ae5eed8e9225045f449246cabf057ea7aa79cf4
Headers

Commit Message

Sven Eckelmann May 21, 2011, 12:28 p.m. UTC
  It is possible that a build environment specifies the CC different than
gcc (for example gcc-4.6). The Makefile should only set it when the
compiler wasn't explicitely set.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Marek Lindner May 22, 2011, 9:42 a.m. UTC | #1
On Saturday 21 May 2011 14:28:11 Sven Eckelmann wrote:
> It is possible that a build environment specifies the CC different than
> gcc (for example gcc-4.6). The Makefile should only set it when the
> compiler wasn't explicitely set.

Applied in revision 8ae5eed.

Thanks,
Marek
  

Patch

diff --git a/Makefile b/Makefile
index f95a9d2..a06177d 100755
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@  ifndef V
 endif
 endif
 
-CC = gcc
+CC ?= gcc
 CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing
 EXTRA_CFLAGS = -DREVISION_VERSION=$(REVISION_VERSION)
 LDFLAGS += -lm