Commit 3e1d42b7 by Andreas Ericsson Committed by Shawn O. Pearce

Add a 'sparse' make target

Given the confusion on git@vger, we'd better not name
this target "check" or (worse) "test", but it's still
useful to have. As "sparse", noone should have problems
understanding what it does.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
parent ff7c7576
...@@ -8,7 +8,8 @@ OS = unix ...@@ -8,7 +8,8 @@ OS = unix
BASIC_CFLAGS := -Isrc BASIC_CFLAGS := -Isrc
BASIC_CFLAGS += -fvisibility=hidden BASIC_CFLAGS += -fvisibility=hidden
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c)) SRC_C = $(wildcard src/*.c)
OBJS = $(patsubst %.c,%.o,$(SRC_C))
HDRS = $(wildcard src/*.h) HDRS = $(wildcard src/*.h)
PUBLIC_HEADERS = $(wildcard src/git/*.h) PUBLIC_HEADERS = $(wildcard src/git/*.h)
HDRS += $(PUBLIC_HEADERS) HDRS += $(PUBLIC_HEADERS)
...@@ -39,6 +40,9 @@ apidocs: ...@@ -39,6 +40,9 @@ apidocs:
test: $(TEST_RUN) test: $(TEST_RUN)
sparse:
@for i in $(SRC_C); do sparse $$i $(SPARSE_FLAGS) $(BASIC_CFLAGS) $(CFLAGS); done
install-headers: $(PUBLIC_HEADERS) install-headers: $(PUBLIC_HEADERS)
@mkdir -p /tmp/gitinc/git @mkdir -p /tmp/gitinc/git
@for i in $^; do cat .HEADER $$i > /tmp/gitinc/$${i##src/}; done @for i in $^; do cat .HEADER $$i > /tmp/gitinc/$${i##src/}; done
...@@ -91,3 +95,4 @@ $(TEST_RUN): tests/%.run: tests/%.exe ...@@ -91,3 +95,4 @@ $(TEST_RUN): tests/%.run: tests/%.exe
.PHONY: test $(TEST_RUN) .PHONY: test $(TEST_RUN)
.PHONY: apidocs .PHONY: apidocs
.PHONY: install-headers .PHONY: install-headers
.PHONY: sparse
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment