# http://clang.llvm.org/StaticAnalysis.html
#
-# $ make scan | sed "s/.*Run '//;s/'.*//" > scan.sh
-# $ ./scan.sh
+# $ make SCAN=/path/to/checker/
#
-SCAN_BUILD = /path/to/checker-0.167/scan-build
-ifeq ($(SCAN),yes)
-CC := $(SCAN_BUILD) gcc -DFR_SCAN_BUILD
+ifne ($(SCAN),)
+CC := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
+LIBTOOL :=
endif
$(R)$(libdir)/$(TARGET).la
rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la
-
-.PHONY: scan
-scan:
- @[ "$(SCAN_BUILD)" == "" ] || ($(MAKE) SCAN=yes LIBTOOL= 2>&1) | grep 'scan-view' || true
$(INSTALL) -m 755 radlast $(R)$(bindir)
$(INSTALL) -m 755 radtest $(R)$(bindir)
$(INSTALL) -m 755 radzap $(R)$(bindir)
-
-.PHONY: scan
-scan:
- @[ "$(SCAN_BUILD)" == "" ] || ($(MAKE) SCAN=yes LIBTOOL= 2>&1) | grep 'scan-view' || true
$(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \
fi; \
done
-
-.PHONY: scan
-scan:
- @[ "$(SCAN_BUILD)" == "" ] || ($(MAKE) SCAN=yes LIBTOOL= WHAT_TO_MAKE=scan common 2>&1) | grep 'scan-build' || true
rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la; \
ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la || exit $$?; \
fi
-
-.PHONY: scan
-scan:
- @[ "$(SCAN_BUILD)" == "" ] || ($(MAKE) SCAN=yes LIBTOOL= 2>&1) | grep 'scan-view' || true