1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-21 00:25:37 +00:00

Add rules to check all .c files with sparse

... and things ain't looking too good. Lots of warnings.
This commit is contained in:
Jonas Fonseca 2005-11-24 13:24:19 +01:00 committed by Jonas Fonseca
parent 8399b2caf2
commit 68d692724c
3 changed files with 20 additions and 3 deletions

View File

@ -77,6 +77,7 @@ RANLIB = @RANLIB@
RUBY_CFLAGS = @RUBY_CFLAGS@
RUBY_LIBS = @RUBY_LIBS@
SEE_CFLAGS = @SEE_CFLAGS@
SPARSE = @SPARSE@
SPIDERMONKEY_CFLAGS = @SPIDERMONKEY_CFLAGS@
SPIDERMONKEY_LIBS = @SPIDERMONKEY_LIBS@
VERSION = @VERSION@

View File

@ -33,6 +33,9 @@ quiet_cmd_ld_objs = " [LD] $(RELPATH)$@"
quiet_cmd_link = ' [LINK] $(RELPATH)$@'
cmd_link = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
quiet_cmd_sparse = ' [SPARSE] $(RELPATH)$(2)'
cmd_sparse = $(SPARSE) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(SPARSE_FLAGS) $(2)
# Recursive make
quiet_cmd_recmake = "[MAKE $(3)] $(RELPATH)$(2)"
cmd_recmake = $(MAKE) -C $(2) $(3)
@ -44,7 +47,6 @@ quiet_cmd_installprog = " [INSTALL] $(RELPATH)$(2) -> $(3)"
cmd_installprog = $(INSTALL_PROGRAM) $(2) $(3)
### Internal build rules
DEP_FILES_1 = $(foreach src,$(OBJS),.deps/$(src))
@ -115,6 +117,15 @@ clean-default:
cleanall-default: clean-default
check-default:
ifneq ($(SPARSE),)
@$(foreach file, $(wildcard *.c), \
$(call ncmd,sparse,$(file));)
endif
# sparse is architecture-neutral, which means that we need to tell it
# explicitly what architecture to check for. Fix this up for yours..
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
install-default: all-default
ifdef PROGS
@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
@ -134,9 +145,9 @@ endif
# Recursion:
.PHONY: all-recursive install-recursive clean-recursive cleanall-recursive init-recursive
.PHONY: all-recursive install-recursive clean-recursive cleanall-recursive init-recursive check-recursive
all-recursive install-recursive clean-recursive cleanall-recursive init-recursive:
all-recursive install-recursive clean-recursive cleanall-recursive init-recursive check-recursive:
ifdef SUBDIRS
@$(foreach subdir,$(sort $(SUBDIRS)), \
$(call ncmd,recmake,$(subdir),$(subst -recursive,,$@)) || exit 1;)
@ -144,6 +155,7 @@ endif
all: all-recursive all-default all-local
install: install-recursive install-default install-local
check: check-recursive check-default check-local
clean: clean-recursive clean-default clean-local
cleanall: cleanall-recursive cleanall-default
@ -152,6 +164,7 @@ init: init-default init-recursive
all-local:
install-local:
clean-local:
check-local:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -54,6 +54,9 @@ AC_PROG_INSTALL
AC_PATH_PROGS(CG_COMMIT_ID, "cg-commit-id")
AC_PATH_PROGS(SPARSE, "sparse")
AC_SUBST(SPARSE)
CONFIG_ASCIIDOC="no"
CONFIG_POD2HTML="no"
CONFIG_XMLTO="no"