summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-14 12:53:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:15 -0500
commit2d404f2934f59141bb2941f8f3d77546efcd199c (patch)
treea5b81ed843200da4e4055e3136528edc9e71f9cf /source4
parentcdd6443aed67992f1cfdf021bc5b6ceec48923a1 (diff)
downloadsamba-2d404f2934f59141bb2941f8f3d77546efcd199c.tar.gz
samba-2d404f2934f59141bb2941f8f3d77546efcd199c.tar.bz2
samba-2d404f2934f59141bb2941f8f3d77546efcd199c.zip
r14371: - make 'make CC_CHECKER=foo' possible
can be used with sparse (http://www.kernel.org/git/?p=devel/sparse/sparse.git;a=summary) or other C code analyzers. metze (This used to be commit e616953159ad601414a09536adb21e4e8a294138)
Diffstat (limited to 'source4')
-rw-r--r--source4/main.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/main.mk b/source4/main.mk
index f66c5e3c66..a024a7f2a0 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -327,6 +327,10 @@ unused_macros:
@$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
.c.o:
+ @if test -n "$(CC_CHECKER)"; then \
+ echo Call \'$(CC_CHECKER)\' for $<; \
+ $(CC_CHECKER) `script/cflags.pl $@` $(CFLAGS) $(PICFLAG) -c $< -o $@; \
+ fi
@echo Compiling $<
@$(CC) `script/cflags.pl $@` $(CFLAGS) $(PICFLAG) -c $< -o $@