>From 224fbae491033d673c71eccabe35480f3d7869d0 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade <[email protected]>
Date: Thu, 5 Feb 2009 17:33:54 -0200
Subject: [PATCH 2/2] Janitor: make distcheck, .gitignore.

  Use `` instead of $().
  Use $PKG_CONFIG to honor user build setup.
  Use a single .gitignore file.
  Use the XORG_CWARFLAGS and XORG_CHANGELOG macros.

Signed-off-by: Paulo Cesar Pereira de Andrade <[email protected]>
---
 .gitignore      |    6 ++++++
 Makefile.am     |    5 ++---
 configure.ac    |   16 +++++++++-------
 man/.gitignore  |    2 --
 src/.gitignore  |    6 ------
 src/Makefile.am |    2 ++
 6 files changed, 19 insertions(+), 18 deletions(-)
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..068c045 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
 Makefile
 Makefile.in
 *.la
@@ -18,3 +20,7 @@ ltmain.sh
 missing
 stamp-h1
 *~
+*.4
+xf86-input-void-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 4f9559c..1817e61 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,13 +21,12 @@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
 
-EXTRA_DIST = autogen.sh 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 8b0119d..4a62d5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 
 AM_MAINTAINER_MODE
 
-DRIVER_NAME=void
-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"])
 
@@ -76,17 +77,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-AC_SUBST([CFLAGS])
+sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
 
 # Checks for libraries.
 
 # Checks for header files.
 AC_HEADER_STDC
 
+DRIVER_NAME=void
+AC_SUBST([DRIVER_NAME])
+
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile src/Makefile man/Makefile])
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 282522d..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
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 2221bbc..3538c8f 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 = $(CWARNFLAGS) $(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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to