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

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Mon Feb 9 10:53:47 PST 2009


  Use a single .gitignore file.
  Replace ChangeLog with automatically generated one.
  Use same pattern for $moduledir and $sdkdir, that works with
make distcheck.
  Use XORG_CWARNFLAGS to help find driver problems.
  Declares as static two functions used only in a single C file.
  This also significantly simplify configure.ac and Makefile.am,
as config.h includes xorg-server.h, that defines XSERVER_LIBPCIACCESS.

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
---
 .gitignore         |    6 +++
 ChangeLog          |  101 ----------------------------------------------------
 Makefile.am        |   10 +++++-
 configure.ac       |   38 ++++---------------
 man/.gitignore     |    2 -
 man/Makefile.am    |    4 +-
 src/.gitignore     |    6 ---
 src/Makefile.am    |    2 +-
 src/glint_driver.c |    2 +-
 src/pm3_video.c    |    2 +-
 src/sx_accel.c     |    2 +-
 src/tx_accel.c     |    2 +-
 12 files changed, 30 insertions(+), 147 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 man/.gitignore
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..825709a 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-glint-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 1b228b9..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,101 +0,0 @@
-2006-04-07  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	* src/glint.h:
-	Bump to 1.1.1 for Xv changes.
-
-2006-04-07  Aaron Plattner  <aplattner at nvidia.com>
-
-	* src/pm2_video.c: (Permedia2PutVideo), (Permedia2PutStill),
-	(Permedia2GetVideo), (Permedia2GetStill), (Permedia2PutImage):
-	* src/pm3_video.c: (Permedia3PutImage):
-	Add a DrawablePtr argument to the XV functions to pave the way for
-	redirected video.
-
-2006-04-07  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	* src/IBMramdac.c:
-	* src/TIramdac.c:
-	* src/glint.h:
-	* src/glint_dga.c:
-	* src/glint_dri.c:
-	* src/glint_driver.c:
-	* src/glint_shadow.c:
-	* src/pm2_accel.c:
-	* src/pm2_dac.c:
-	* src/pm2_video.c:
-	* src/pm2ramdac.c:
-	* src/pm2v_dac.c:
-	* src/pm2vramdac.c:
-	* src/pm3_accel.c:
-	* src/pm3_dac.c:
-	* src/pm3_video.c:
-	* src/pm_accel.c:
-	* src/pm_dac.c:
-	* src/sx_accel.c:
-	* src/tx_accel.c:
-	* src/tx_dac.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 1.1.0.
-
-2006-02-02  Alan Hourihane  <alanh at fairlite.demon.co.uk>
-
-	* src/glint.h:
-	Allocate more space for the dac registers on pm2v hardware.
-
-2006-01-09  David Nusinow  <gravity-at-freedesktop-dot-org>
-
-	* man/glint.man:
-	Convert manpage to utf-8
-	Bugzilla #1925 <https://bugs.freedesktop.org/show_bug.cgi?id=1925>
-
-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-20  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	Bump libdrm dep to 2.0.
-
-2005-11-29  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	Only build dlloader modules by default.
-
-2005-11-15  Kevin E. Martin  <kem-at-freedesktop-dot-org>
-
-	* configure.ac:
-	Add check for DGA extension to fix issues when building with
-	separate build roots.
-
-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 02ec5b8..7089d9e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,4 +21,12 @@
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src man
 
-EXTRA_DIST = DRI.txt README.pm3
+EXTRA_DIST = DRI.txt README.pm3 ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index b1b24a1..7d31781 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_INIT([xf86-video-glint],
         xf86-video-glint)
 
 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(.)
 
@@ -40,12 +43,10 @@ AC_PROG_LIBTOOL
 AC_PROG_CC
 
 AH_TOP([#include "xorg-server.h"])
-
-AC_ARG_WITH(xorg-module-dir,
-            AC_HELP_STRING([--with-xorg-module-dir=DIR],
-                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
-            [moduledir="$withval"],
-            [moduledir="$libdir/xorg/modules"])
+moduledir="$libdir/xorg/modules"
+sdkdir="$includedir/xorg"
+AC_SUBST(moduledir)
+AC_SUBST(sdkdir)
 
 AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
                                   [Disable DRI support [[default=auto]]]),
@@ -61,16 +62,6 @@ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
 
 # 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)
-
-# Checks for libraries.
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
-AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
-              [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
-              [#include "xorg-server.h"])
-AC_CHECK_HEADER(cfb8_32.h,[AC_DEFINE(HAVE_CFB8_32, 1, [Have cfb8_32 support])],[])
-CPPFLAGS="$SAVE_CPPFLAGS"
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -103,22 +94,9 @@ if test "$DRI" = yes; then
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
 fi
 
-if test "x$XSERVER_LIBPCIACCESS" = xyes; then
-    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
-    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
-fi
-AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-
-
-AC_SUBST([DRI_CFLAGS])
-AC_SUBST([XORG_CFLAGS])
-AC_SUBST([moduledir])
-
-DRIVER_NAME=glint
-AC_SUBST([DRIVER_NAME])
-
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([
 	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/man/Makefile.am b/man/Makefile.am
index f0eb29b..7aae6b4 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -26,11 +26,11 @@
 
 drivermandir = $(DRIVER_MAN_DIR)
 
-driverman_PRE = @DRIVER_NAME at .man
+driverman_PRE = glint.man
 
 driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
 
-EXTRA_DIST = @DRIVER_NAME at .man
+EXTRA_DIST = glint.man
 
 CLEANFILES = $(driverman_DATA)
 
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 79c9e54..8d0a414 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@ @DRI_CFLAGS@
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DRI_CFLAGS)
 glint_drv_la_LTLIBRARIES = glint_drv.la
 glint_drv_la_LDFLAGS = -module -avoid-version
 glint_drv_ladir = @moduledir@/drivers
diff --git a/src/glint_driver.c b/src/glint_driver.c
index fd5b34c..09836fe 100644
--- a/src/glint_driver.c
+++ b/src/glint_driver.c
@@ -400,7 +400,7 @@ static XF86ModuleVersionInfo glintVersRec =
 
 _X_EXPORT XF86ModuleData glintModuleData = { &glintVersRec, glintSetup, NULL };
 
-pointer
+static pointer
 glintSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
     static Bool setupDone = FALSE;
diff --git a/src/pm3_video.c b/src/pm3_video.c
index 6f07ed3..27deb3c 100644
--- a/src/pm3_video.c
+++ b/src/pm3_video.c
@@ -264,7 +264,7 @@ do{                                                             \
 	GLINT_WRITE_REG(data, PM3RD_IndexedData);		\
 }while(0)
 
-void Permedia3ResetVideo(ScrnInfoPtr pScrn) 
+static void Permedia3ResetVideo(ScrnInfoPtr pScrn) 
 {
     GLINTPtr pGlint = GLINTPTR(pScrn);
     GLINTPortPrivPtr pPriv = pGlint->adaptor->pPortPrivates[0].ptr;
diff --git a/src/sx_accel.c b/src/sx_accel.c
index 3b5c143..01cf16d 100644
--- a/src/sx_accel.c
+++ b/src/sx_accel.c
@@ -519,7 +519,7 @@ SXSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
 }
 #endif
 
-void SXSetupForMono8x8PatternFill(
+static void SXSetupForMono8x8PatternFill(
 	ScrnInfoPtr pScrn,
 	int patternx, int patterny, 
 	int fg, int bg, int rop,
diff --git a/src/tx_accel.c b/src/tx_accel.c
index 14a689d..9c704a4 100644
--- a/src/tx_accel.c
+++ b/src/tx_accel.c
@@ -593,7 +593,7 @@ TXSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
     }
 }
 
-void TXSetupForMono8x8PatternFill(
+static void TXSetupForMono8x8PatternFill(
 	ScrnInfoPtr pScrn,
 	int patternx, int patterny, 
 	int fg, int bg, int rop,
-- 
1.6.1

------=_20090209172947_42618--



More information about the xorg-devel mailing list