Add support for checking sources with sparse/lint/etc.
authorAlan Coopersmith <alan.coopersmith@sun.com>
Tue, 20 Mar 2007 02:09:27 +0000 (19:09 -0700)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Tue, 20 Mar 2007 02:09:27 +0000 (19:09 -0700)
Makefile.am
configure.ac

index e45c79a..cdf2bac 100644 (file)
@@ -92,3 +92,11 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
 .man.$(APP_MAN_SUFFIX):
        sed $(MAN_SUBSTS) < $< > $@
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+               $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+       $(LINT) $(ALL_LINT_FLAGS) $(AM_CFLAGS) $(xdpyinfo_SOURCES)
+endif LINT
index c9be18a..825ddd0 100644 (file)
@@ -109,6 +109,9 @@ PKG_CHECK_MODULES(DPY_XTST, xtst,
        AC_CHECK_HEADERS([X11/extensions/record.h],,,[#include <X11/Xlib.h>])
        CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
 
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION