The same solution proposed in xf86-input-evdev was used to correct make distcheck. This may not be the best solution as someone compiling from source may think the option should be used :-)
>From a98e4825b3268e3b57402dd64b5a3621159965cb Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade <p...@mandriva.com.br> Date: Wed, 4 Feb 2009 18:10:26 -0200 Subject: [PATCH 1/2] Janitor: make distcheck, .gitignore. The correction for make distcheck uses the same solution proposed for xf86-input-evdev, that uses the new configure option --with-sdkdir. Signed-off-by: Paulo Cesar Pereira de Andrade <p...@mandriva.com.br> --- .gitignore | 4 ++++ Makefile.am | 8 ++++---- configure.ac | 21 ++++++++++++++------- man/.gitignore | 3 --- src/.gitignore | 6 ------ src/Makefile.am | 2 ++ 6 files changed, 24 insertions(+), 20 deletions(-) delete mode 100644 man/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index c96e99e..e5a79a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.deps +.libs Makefile Makefile.in *.la @@ -18,7 +20,9 @@ ltmain.sh missing stamp-h1 *~ +*.4 xf86-input-joystick-*.tar.bz2 xf86-input-joystick-*.tar.gz ChangeLog *.pc +tags diff --git a/Makefile.am b/Makefile.am index bc41c7c..be8812f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,18 +19,18 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTOMAKE_OPTIONS = foreign +DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg SUBDIRS = src man config include pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-joystick.pc -EXTRA_DIST = autogen.sh ChangeLog - -CLEANFILES = ChangeLog +EXTRA_DIST = ChangeLog +MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog 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) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 45a021a..fc4627a 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=joystick -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include "xorg-server.h"]) @@ -72,12 +73,14 @@ XORG_DRIVER_CHECK_EXT(XKB, kbproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server >= 1.3.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" +xorg_sdkdir=$(pkg-config --variable=sdkdir xorg-server) +AC_ARG_WITH(sdkdir, + AC_HELP_STRING([--with-sdkdir=<path>], + [Xorg X Server sdk headers (default is autodetected)]), + [sdkdir="$withval"], [sdkdir="${xorg_sdkdir}"]) AC_SUBST(sdkdir) -CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) - # Checks for libraries. # Checks for header files. @@ -110,8 +113,12 @@ fi AC_HEADER_STDC +DRIVER_NAME=joystick +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 62796a4..0000000 --- a/man/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -joystick.4* diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 9730646..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.la -*.lo diff --git a/src/Makefile.am b/src/Makefile.am index b30da44..fecb7e0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ -- 1.6.1
_______________________________________________ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg