about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-03-08 16:32:15 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2015-03-09 17:38:22 +0100
commit5150b7c1e69b4b09821e438006cfd77d82edae3b (patch)
tree8ee926a5ddbe2e47a0e14ef3957b29201992c0f1
parentgit: update to v2.3.2 (diff)
downloadcgit-pink-5150b7c1e69b4b09821e438006cfd77d82edae3b.tar.gz
cgit-pink-5150b7c1e69b4b09821e438006cfd77d82edae3b.zip
Makefile: add a target to run CGit through sparse
Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to '')
-rw-r--r--Makefile3
-rw-r--r--cgit.mk9
2 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ed329e8..42ed230 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,9 @@ all:: cgit
 cgit:
 	$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1
 
+sparse:
+	$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk NO_CURL=1 cgit-sparse
+
 test:
 	@$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all
 	$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
diff --git a/cgit.mk b/cgit.mk
index 5048b09..1b50307 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -96,7 +96,7 @@ CGIT_OBJS := $(addprefix $(CGIT_PREFIX),$(CGIT_OBJ_NAMES))
 
 # Only cgit.c reference CGIT_VERSION so we only rebuild its objects when the
 # version changes.
-CGIT_VERSION_OBJS := $(addprefix $(CGIT_PREFIX),cgit.o)
+CGIT_VERSION_OBJS := $(addprefix $(CGIT_PREFIX),cgit.o cgit.sp)
 $(CGIT_VERSION_OBJS): $(CGIT_PREFIX)VERSION
 $(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \
 	-DCGIT_VERSION='"$(CGIT_VERSION)"'
@@ -129,3 +129,10 @@ $(CGIT_OBJS): %.o: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS $(missing_dep_dirs)
 $(CGIT_PREFIX)cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS)
 	@echo 1>&1 "    * $(LUA_MESSAGE)"
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) $(CGIT_LIBS)
+
+CGIT_SP_OBJS := $(patsubst %.o,%.sp,$(CGIT_OBJS))
+
+$(CGIT_SP_OBJS): %.sp: %.c GIT-CFLAGS $(CGIT_PREFIX)CGIT-CFLAGS FORCE
+	$(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $(SPARSE_FLAGS) $<
+
+cgit-sparse: $(CGIT_SP_OBJS)
;id=4c4d91b4499d3a4bdc3850c4ad8a1713ce3a8e65&follow=1'>Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe