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

Paulo Cesar Pereira de Andrade pcpa at mandriva.com.br
Mon Feb 9 11:27:22 PST 2009


  Use a single .gitignore file and remove .cvsignore ones.
  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.
  Use XSERVER_LIBPCIACCESS defines from xorg-server.h.

Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa at mandriva.com.br>
---
 .gitignore        |    6 +++++
 ChangeLog         |   57 -----------------------------------------------------
 Makefile.am       |   10 ++++++++-
 configure.ac      |   38 ++++++++---------------------------
 man/.cvsignore    |    2 -
 man/Makefile.am   |    4 +-
 src/.cvsignore    |    6 -----
 src/Makefile.am   |    2 +-
 src/i740_driver.c |    7 ++---
 src/i740_video.c  |    1 +
 10 files changed, 31 insertions(+), 102 deletions(-)
 delete mode 100644 ChangeLog
 delete mode 100644 man/.cvsignore
 delete mode 100644 src/.cvsignore

diff --git a/.gitignore b/.gitignore
index 2df4a8d..a36a1e9 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-i740-*.tar.*
+ChangeLog
+tags
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 3ed86ec..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,57 +0,0 @@
-2006-04-07  Adam Jackson  <ajax at freedesktop.org>
-
-	* configure.ac:
-	* src/i740_accel.c:
-	* src/i740_cursor.c:
-	* src/i740_dga.c:
-	* src/i740_driver.c:
-	* src/i740_i2c.c:
-	* src/i740_io.c:
-	* src/i740_video.c:
-	Delibcwrap, bump required server, update to 1.1.0.
-
-2006-04-07  Aaron Plattner  <aplattner at nvidia.com>
-
-	* src/i740_video.c: (I740PutImage):
-	Add a DrawablePtr argument to the XV functions to pave the way for
-	redirected video.
-
-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-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 53123b9..36e1bd0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,4 +26,12 @@ README:
 	$(MAKE_TEXT) README.sgml && mv README.txt README
 endif
 
-EXTRA_DIST = README.sgml
+EXTRA_DIST = README.sgml ChangeLog
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 04939fe..e0ce5f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_INIT([xf86-video-i740],
         xf86-video-i740)
 
 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,
-            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)
 
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -55,35 +57,13 @@ 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)
-
-# 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"])
-CPPFLAGS="$SAVE_CPPFLAGS"
 
 # Checks for header files.
 AC_HEADER_STDC
 
-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([XORG_CFLAGS])
-AC_SUBST([moduledir])
-
-DRIVER_NAME=i740
-AC_SUBST([DRIVER_NAME])
-
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
-
+XORG_CHANGELOG
 XORG_CHECK_LINUXDOC
 
 AC_OUTPUT([
diff --git a/man/.cvsignore b/man/.cvsignore
deleted file mode 100644
index 282522d..0000000
--- a/man/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/man/Makefile.am b/man/Makefile.am
index f0eb29b..9dff916 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 = i740.man
 
 driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
 
-EXTRA_DIST = @DRIVER_NAME at .man
+EXTRA_DIST = i740.man
 
 CLEANFILES = $(driverman_DATA)
 
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644
index 9730646..0000000
--- a/src/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
diff --git a/src/Makefile.am b/src/Makefile.am
index 6f084aa..714e400 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)
 i740_drv_la_LTLIBRARIES = i740_drv.la
 i740_drv_la_LDFLAGS = -module -avoid-version
 i740_drv_ladir = @moduledir@/drivers
diff --git a/src/i740_driver.c b/src/i740_driver.c
index f6a0688..8c9606b 100644
--- a/src/i740_driver.c
+++ b/src/i740_driver.c
@@ -90,6 +90,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i740_dga.h"
 #include "i740.h"
 
+#include <unistd.h>
 
 /* Required Functions: */
 static const OptionInfoRec * I740AvailableOptions(int chipid, int busid);
@@ -839,15 +840,13 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
 
 static Bool I740MapMem(ScrnInfoPtr pScrn)
 {
-  int mmioFlags;
   I740Ptr pI740;
 
   pI740 = I740PTR(pScrn);
 
 #ifndef XSERVER_LIBPCIACCESS
-  mmioFlags = VIDMEM_MMIO | VIDMEM_READSIDEEFFECT;
-
-  pI740->MMIOBase = xf86MapPciMem(pScrn->scrnIndex, mmioFlags, 
+  pI740->MMIOBase = xf86MapPciMem(pScrn->scrnIndex,
+				  VIDMEM_MMIO | VIDMEM_READSIDEEFFECT, 
 				      pI740->PciTag, 
 				      pI740->MMIOAddr,
 				      0x80000);
diff --git a/src/i740_video.c b/src/i740_video.c
index ad6c5f9..5408403 100644
--- a/src/i740_video.c
+++ b/src/i740_video.c
@@ -75,6 +75,7 @@
 #include "vgaHW.h"
 #include "i740.h"
 
+#include <unistd.h>
 
 #define FOURCC_RV15     0x35315652
 #define FOURCC_RV16     0x36315652
-- 
1.6.1

------=_20090209175731_48753--



More information about the xorg-devel mailing list