add sparse-check target to makefiles

sparse is a semantic parser developed for the Linux kernel,
but works for any project written (ANSI) C.

You can get sparse via git here:
git clone git://www.kernel.org/pub/scm/devel/sparse/sparse.git

git-svn-id: https://svn.musicpd.org/mpd/trunk@4377 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2006-07-17 00:15:31 +00:00
parent e570f13d74
commit 0c24fc0cb3
2 changed files with 15 additions and 1 deletions

View File

@ -2,5 +2,8 @@ AUTOMAKE_OPTIONS = foreign 1.6
SUBDIRS = src doc
docdir = $(prefix)/share/doc/$(PACKAGE)
doc_DATA = README UPGRADING
doc_DATA = README UPGRADING
EXTRA_DIST = COPYING $(doc_DATA)
sparse-check:
$(MAKE) -C src $@

View File

@ -116,3 +116,14 @@ mpd_CFLAGS = $(MPD_CFLAGS)
mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB) $(MP4FF_LIB)
DIST_SUBDIRS = mp4ff
# sparse is a semantic parser
# URL: git://www.kernel.org/pub/scm/devel/sparse/sparse.git
SPARSE = sparse
SPARSE_FLAGS =
sparse-check:
for i in $(mpd_SOURCES); \
do \
$(SPARSE) -I. $(mpd_CFLAGS) $(SPARSE_FLAGS) $(srcdir)/$$i || exit; \
done