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

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Mon Feb 9 08:42:16 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.

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
---
 .gitignore         |    5 +++++
 ChangeLog          |   52 ----------------------------------------------------
 Makefile.am        |    9 +++++++++
 configure.ac       |   26 ++++++++------------------
 src/.gitignore     |    6 ------
 src/Makefile.am    |    2 ++
 src/dummy.h        |    2 +-
 src/dummy_driver.c |    4 ++--
 8 files changed, 27 insertions(+), 79 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 src/.gitignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..0a8122c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
 Makefile
 Makefile.in
 *.la
@@ -18,3 +20,6 @@ ltmain.sh
 missing
 stamp-h1
 *~
+xf86-video-dummy-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 89f15c8..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,52 +0,0 @@
-2006-04-06  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	* src/dummy.h:
-	* src/dummy_cursor.c:
-	* src/dummy_dga.c:
-	* src/dummy_driver.c:
-	Unlibcwrap.  Bump server version requirement.  Bump to 0.2.0.
-
-	* src/dummy_driver.c:
-	VERSION -> DUMMY_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-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-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 16f4412..c39ae5b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,3 +20,12 @@
 
 AUTOMAKE_OPTIONS = foreign
 SUBDIRS = src
+EXTRA_DIST = ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index b365f8d..c5827cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_INIT([xf86-video-dummy],
         xf86-video-dummy)
 
 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,14 +41,13 @@ AM_MAINTAINER_MODE
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_PROG_CC
+XORG_CWARNFLAGS
 
 AH_TOP([#include "xorg-server.h"])
-
-AC_ARG_WITH(xorg-module-dir, [  --with-xorg-module-dir=DIR ],
-                             [ moduledir="$withval" ],
-                             [ moduledir="$libdir/xorg/modules" ])
+moduledir="$libdir/xorg/modules"
+sdkdir="$includedir/xorg"
 AC_SUBST(moduledir)
-
+AC_SUBST(sdkdir)
 
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -55,23 +57,11 @@ 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)
-
-CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src'
-INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/src -I$(prefix)/include'
-AC_SUBST([CFLAGS])
-AC_SUBST([INCLUDES])
 
-# Checks for libraries.
-
-# Checks for header files.
 AC_HEADER_STDC
-
-DRIVER_NAME=dummy
-AC_SUBST([DRIVER_NAME])
-
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([
 	Makefile
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 8cf4f1f..ad86f63 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)
+
 dummy_drv_la_LTLIBRARIES = dummy_drv.la
 dummy_drv_la_LDFLAGS = -module -avoid-version
 dummy_drv_ladir = @moduledir@/drivers
diff --git a/src/dummy.h b/src/dummy.h
index 3442f63..689584a 100644
--- a/src/dummy.h
+++ b/src/dummy.h
@@ -64,7 +64,7 @@ typedef struct dummyRec
     int interlace;
     dummy_colors colors[256];
     pointer* FBBase;
-    Bool        (*CreateWindow)() ;     /* wrapped CreateWindow */
+    Bool        (*CreateWindow)(WindowPtr pWin) ;     /* wrapped CreateWindow */
     Bool prop;
 } DUMMYRec, *DUMMYPtr;
 
diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index 1f44d7e..ea0b371 100644
--- a/src/dummy_driver.c
+++ b/src/dummy_driver.c
@@ -303,7 +303,7 @@ DUMMYProbe(DriverPtr drv, int flags)
 					     }
 
 /* Mandatory */
-Bool
+static Bool
 DUMMYPreInit(ScrnInfoPtr pScrn, int flags)
 {
     ClockRangePtr clockRanges;
@@ -791,7 +791,7 @@ dummyModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 }
 
 
-Atom VFB_PROP  = 0;
+static Atom VFB_PROP  = 0;
 #define  VFB_PROP_NAME  "VFB_IDENT"
 
 
-- 
1.6.1

------=_20090209151724_75060--



More information about the xorg-devel mailing list