diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-11-07 18:39:58 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-11-07 18:39:58 -0800 |
commit | aa27f60ff70230990bd7351bbfda3d38f95afe3b (patch) | |
tree | 6cc0bbaf53246ae38f69fa73ed7ad48745993c3c | |
parent | fd251f039f74f2ef8ef8a019566eebf9d22be098 (diff) |
Add hooks for checking code with lint/sparse/etc.
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index f33a11a..45a089d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,3 +63,11 @@ sessreg.$(APP_MAN_SUFFIX): filenames.sed filenames.sed: filenames.sed.c $(CPP) $(DEFS) $(srcdir)/filenames.sed.c | grep 's\|__' > $@ + +if LINT +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +lint: + $(LINT) $(ALL_LINT_FLAGS) $(sessreg_SOURCES) +endif LINT diff --git a/configure.ac b/configure.ac index 93a28da..7d41c14 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,10 @@ AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) +# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.1) + AC_PROG_CC AC_PROG_INSTALL @@ -46,6 +50,9 @@ AC_SYS_LARGEFILE PKG_CHECK_MODULES(SESSREG, x11) AC_SUBST(SESSREG_CFLAGS) +# Allow checking code with lint, sparse, etc. +XORG_WITH_LINT + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION |