Skip to content

Commit

Permalink
Tweaked infer target
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 2, 2024
1 parent f75c654 commit ee6dd71
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
24 changes: 15 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ endif

INSTALL_TARGETS := install-headers

# Build libraries
.PHONY: libs
libs: shared static

# Build everything...
.PHONY: all
all: libs $(DOC_TARGETS) check

# Build for distribution
.PHONY: distro
distro: shared $(DOC_TARGETS)
Expand All @@ -50,6 +42,14 @@ shared: $(LIB)/libxchange.so
.PHONY: static
static: $(LIB)/libxchange.a

# Build libraries
.PHONY: libs
libs: shared static

# Build everything...
.PHONY: all
all: libs $(DOC_TARGETS) check

# Run regression tests
.PHONY: test
test: $(LIB)/libxchange.a
Expand All @@ -59,6 +59,11 @@ test: $(LIB)/libxchange.a
.PHONY: check
check: test analyze

# Static code analysis via Facebook's infer
.PHONY: infer
infer: clean
infer run -- make shared

# Remove intermediates
.PHONY: clean
clean:
Expand Down Expand Up @@ -178,7 +183,8 @@ help:
@echo " local-dox Compiles local HTML API documentation using 'doxygen'."
@echo " analyze Performs static analysis with 'cppcheck'."
@echo " all All of the above."
@echo " install Install components (e.g. 'make prefix=<path> install')"
@echo " distro shared libs and documentation (default target)."
@echo " install Install components (e.g. 'make prefix=<path> install')."
@echo " clean Removes intermediate products."
@echo " distclean Deletes all generated files."
@echo
Expand Down
5 changes: 0 additions & 5 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ analyze:
@echo " [analyze]"
@cppcheck $(CPPFLAGS) $(CHECKOPTS) src

# Static code analysis viacat Facebook's infer
.PHONY: infer
infer: CC := infer run -- $(CC)
infer: distclean shared

# Doxygen documentation (HTML and man pages) under apidocs/
.PHONY: dox
dox: README.md Doxyfile apidoc $(SRC) $(INC)
Expand Down

0 comments on commit ee6dd71

Please sign in to comment.