summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-02 01:06:25 -0500
committerTingPing <tingping@tingping.se>2014-12-02 01:06:25 -0500
commite38f00775f31102a696418b59e88b1586706a359 (patch)
tree5332f76a6da8ea436131bd65d8b849b18ed053b7 /src
parent05a6097dc659e6567e2d081061a44a585ddc5f67 (diff)
configure: Add option to run clang static analysis
Diffstat (limited to 'src')
-rw-r--r--src/common/Makefile.am8
-rw-r--r--src/fe-gtk/Makefile.am9
2 files changed, 17 insertions, 0 deletions
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index e9255d0c..744630c4 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -1,5 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
+include $(top_srcdir)/m4/clang-analyze.am
+
 noinst_LIBRARIES = libhexchatcommon.a
 
 AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)
@@ -79,6 +81,12 @@ marshal.c: $(srcdir)/marshalers.list
 	$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_hexchat_marshal --body $< > $@
 
 
+if DO_STATIC_ANALYSIS
+analyze_plists = $(libhexchatcommon_a_SOURCES:%.c=%.plist)
+all-local: $(analyze_plists)
+MOSTLYCLEANFILES = $(analyze_plists)
+endif
+
 BUILT_SOURCES = textenums.h textevents.h marshal.c marshal.h
 
 CLEANFILES = $(BUILT_SOURCES)
diff --git a/src/fe-gtk/Makefile.am b/src/fe-gtk/Makefile.am
index a8f43ac5..78ca1e45 100644
--- a/src/fe-gtk/Makefile.am
+++ b/src/fe-gtk/Makefile.am
@@ -1,3 +1,6 @@
+
+include $(top_srcdir)/m4/clang-analyze.am
+
 localedir = $(datadir)/locale
 
 bin_PROGRAMS = hexchat
@@ -35,3 +38,9 @@ hexchat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/common
 
 resources.c: $(top_srcdir)/data/hexchat.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(top_srcdir)/data/hexchat.gresource.xml)
 	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-source $<
+
+if DO_STATIC_ANALYSIS
+analyze_plists = $(hexchat_SOURCES:%.c=%.plist)
+all-local: $(analyze_plists)
+MOSTLYCLEANFILES = $(analyze_plists)
+endif