Add XORG_WITH_LINT to allow checking code with lint/sparse/etc.

This commit is contained in:
Alan Coopersmith 2006-10-10 13:33:33 -07:00
parent 932965298c
commit d0e12a9784
3 changed files with 20 additions and 0 deletions

View file

@ -29,3 +29,8 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xcursor.pc
EXTRA_DIST = xcursor.pc.in autogen.sh
if LINT
lint:
(cd src && $(MAKE) $(MFLAGS) lint)
endif LINT

View file

@ -36,6 +36,10 @@ AC_CONFIG_SRCDIR([Makefile.am])
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)
# Check for progs
AC_PROG_CC
AC_PROG_LIBTOOL
@ -65,6 +69,9 @@ AC_SUBST(XCURSOR_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
dnl Allow checking code with lint, sparse, etc.
XORG_WITH_LINT
AC_OUTPUT([Makefile
src/Makefile
man/Makefile

View file

@ -18,3 +18,11 @@ libXcursor_la_LDFLAGS = -version-number 1:0:2 -no-undefined
libXcursorincludedir = $(includedir)/X11/Xcursor
libXcursorinclude_HEADERS = $(top_srcdir)/include/X11/Xcursor/Xcursor.h
if LINT
ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
lint:
$(LINT) $(ALL_LINT_FLAGS) $(libXcursor_la_SOURCES) $(XCURSOR_LIBS)
endif LINT