summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 18:03:23 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-26 18:03:23 -0200
commit3d1146293d84cecaff18aa44b95539910e24ef11 (patch)
tree8f329a10f2ca0b12e0b8c405bf1a854d73f98a3c
parent9f79fc8957d595cc9f7131ee5230b5bb3aae0679 (diff)
Correct make distcheck and most sparse warnings.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac7
-rw-r--r--xset.c4
4 files changed, 14 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 6e89fb1..286a275 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@ stamp-h1
xset
xset.1
*~
+*.o
+xset-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index 1ec91cd..9e4826c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,14 +35,14 @@ appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
-EXTRA_DIST = $(appman_PRE) ChangeLog autogen.sh
+EXTRA_DIST = $(appman_PRE) ChangeLog
CLEANFILES = $(appman_DATA)
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 4522853..4982b3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,10 +25,14 @@ AC_INIT(xset,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# 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_PROG_CC
AC_PROG_INSTALL
+XORG_CWARNFLAGS
# Checks for system functions
AC_CHECK_FUNCS([usleep])
@@ -71,7 +75,7 @@ PKG_CHECK_MODULES(SET_XPRINT, xp,
AC_CHECK_HEADERS([X11/extensions/Print.h],,,[#include <X11/Xlib.h>])
CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
-XSET_CFLAGS="$XSET_CFLAGS $SET_XEXT_CFLAGS $SET_XKB_CFLAGS $SET_XF86MISC_CFLAGS $SET_FONTCACHE_CFLAGS $SET_XPRINT_CFLAGS"
+XSET_CFLAGS="$CWARNFLAGS $XSET_CFLAGS $SET_XEXT_CFLAGS $SET_XKB_CFLAGS $SET_XF86MISC_CFLAGS $SET_FONTCACHE_CFLAGS $SET_XPRINT_CFLAGS"
XSET_LIBS="$XSET_LIBS $SET_XEXT_LIBS $SET_XKB_LIBS $SET_XF86MISC_LIBS $SET_FONTCACHE_LIBS $SET_XPRINT_LIBS"
AC_SUBST(XSET_CFLAGS)
@@ -79,5 +83,6 @@ AC_SUBST(XSET_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
+XORG_CHANGELOG
AC_OUTPUT([Makefile])
diff --git a/xset.c b/xset.c
index 0b0243e..bfdb6e7 100644
--- a/xset.c
+++ b/xset.c
@@ -141,9 +141,9 @@ static void query_cache_status(Display *dpy);
if (i >= argc) \
break; \
-char *progName;
+static char *progName;
-int error_status = 0;
+static int error_status = 0;
static int is_number(char *arg, int maximum);
static void set_click(Display *dpy, int percent);