summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-07-17 13:01:07 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-07-17 13:01:07 -0700
commite1cb231b31be520b76aeb72acc1af9ff6682fa9d (patch)
tree8e92db122dbe9d43c28ca41c835bc90eb803a3f6
parenteda127631001674cd40466fddb5225e618c2a327 (diff)
Add hooks for checking source code with lint/sparse/etc.
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac3
2 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index aedac7d..6c43dd3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -79,3 +79,11 @@ ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
dist-hook: ChangeLog
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+ $(LINT) $(ALL_LINT_FLAGS) $(AM_CFLAGS) $(xmodmap_SOURCES)
+endif LINT
diff --git a/configure.ac b/configure.ac
index 21ad812..089720f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,9 @@ PKG_CHECK_MODULES(DEP, x11)
AC_SUBST(DEP_CFLAGS)
AC_SUBST(DEP_LIBS)
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION