[PATCH] Janitor: make distcheck, compiler warnings, .gitignore.

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Fri Feb 6 13:10:04 PST 2009


  Use `` instead of $().
  Use $PKG_CONFIG to honor user build setup.
  Replace ChangeLog with automatically generated version.
  Use XORG_CWARNFLAGS to help find driver problems.
  Use a single .gitignore file.
  Declare a variable only used "#ifndef XSERVER_LIBPCIACCESS"
inside the related code block.

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
---
 .gitignore       |    6 +++++
 ChangeLog        |   67 ------------------------------------------------------
 Makefile.am      |   10 +++++++-
 configure.ac     |   11 +++++---
 src/Makefile.am  |    2 +-
 src/cir_driver.c |    4 +--
 6 files changed, 24 insertions(+), 76 deletions(-)
 delete mode 100644 ChangeLog

diff --git a/.gitignore b/.gitignore
index 2df4a8d..5b3ddb3 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-video-cirrus-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 92ba092..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,67 +0,0 @@
-2006-04-06  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	* src/CirrusClk.c:
-	* src/alp_driver.c:
-	* src/alp_hwcurs.c:
-	* src/alp_i2c.c:
-	* src/alp_xaa.c:
-	* src/alp_xaam.c:
-	* src/cir.h:
-	* src/cir_dga.c:
-	* src/cir_driver.c:
-	* src/cir_shadow.c:
-	* src/lg_driver.c:
-	* src/lg_hwcurs.c:
-	* src/lg_i2c.c:
-	* src/lg_xaa.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-	* src/cir_driver.c:
-	VERSION -> CIR_VERSION
-
-2005-12-20  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version for X11R7 release.
-
-2005-12-14  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for final X11R7 release candidate.
-
-2005-12-06  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* man/Makefile.am:
-	Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC3 release.
-
-2005-12-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Remove extraneous AC_MSG_RESULT.
-
-2005-11-29  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-28  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* src/Makefile.am:
-	Separate cirrus driver into _drv, _alpine and _laguna components
-	as they are in the monolithic tree.
-
-2005-11-09  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update package version number for X11R7 RC2 release.
-
-2005-11-01  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Update pkgcheck dependencies to work with separate build roots.
diff --git a/Makefile.am b/Makefile.am
index ceec308..42fcf36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,4 +21,12 @@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
 
-EXTRA_DIST = README.multihead
+EXTRA_DIST = README.multihead ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index a17ccab..8385536 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_INIT([xf86-video-cirrus],
         xf86-video-cirrus)
 
 AC_CONFIG_SRCDIR([Makefile.am])
+# 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])
 AC_CONFIG_AUX_DIR(.)
 
@@ -38,6 +41,7 @@ AM_MAINTAINER_MODE
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_PROG_CC
+XORG_CWARNFLAGS
 
 AH_TOP([#include "xorg-server.h"])
 
@@ -46,6 +50,7 @@ AC_ARG_WITH(xorg-module-dir,
                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
+AC_SUBST([moduledir])
 
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -55,7 +60,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
 
 # Checks for libraries.
 SAVE_CPPFLAGS="$CPPFLAGS"
@@ -76,14 +81,12 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 # Checks for header files.
 AC_HEADER_STDC
 
-AC_SUBST([XORG_CFLAGS])
-AC_SUBST([moduledir])
-
 DRIVER_NAME=cirrus
 AC_SUBST([DRIVER_NAME])
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([
 	Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 88f6fa1..f8021c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,7 @@
 # -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@
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS)
 
 cirrus_drv_la_LTLIBRARIES = cirrus_drv.la
 cirrus_drv_la_LDFLAGS = -module -avoid-version
diff --git a/src/cir_driver.c b/src/cir_driver.c
index 0ce058d..f8a9f3b 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -323,8 +323,6 @@ CIRProbe(DriverPtr drv, int flags)
 _X_EXPORT Bool
 CirMapMem(CirPtr pCir, int scrnIndex)
 {
-	int mmioFlags;
-
 #ifdef CIR_DEBUG
 	ErrorF("CirMapMem\n");
 #endif
@@ -368,7 +366,7 @@ CirMapMem(CirPtr pCir, int scrnIndex)
 	} else {
 
 #ifndef XSERVER_LIBPCIACCESS
-		mmioFlags = VIDMEM_MMIO;
+		int mmioFlags = VIDMEM_MMIO;
 		/*
 		 * For Alpha, we need to map SPARSE memory, since we need
 		 * byte/short access.  Common-level will automatically use
-- 
1.6.1

------=_20090206194818_31088--



More information about the xorg-devel mailing list