summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-05-17 15:49:25 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-17 15:52:23 +1000
commit5ced43e5b623b87c33e7188ddf7c6cb5fe09990c (patch)
tree9f2a8734d3c39dfbe390c14018a54b93f32847fa
parenta536adf036863bec5913ff89f4bab0ead6cca660 (diff)
Autotool, add .gitignore
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--.gitignore80
-rw-r--r--Makefile58
-rw-r--r--Makefile.am57
-rwxr-xr-xautogen.sh13
-rw-r--r--configure.ac43
5 files changed, 193 insertions, 58 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f22dfd6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,80 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for xkbutils
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
+xkbset
+
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 05d1360..0000000
--- a/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-X11PREFIX=/usr/X11R6
-X11BASE=/usr/X11R6
-
-INSTALL_BIN=${DESTDIR}${X11PREFIX}/bin
-INSTALL_MAN1=${DESTDIR}${X11PREFIX}/man/man1
-
-INC_PATH=-I${X11BASE}/include
-LIB_PATH=-L${X11BASE}/lib
-LIBS=-lX11
-
-all: xkbset xkbset.1
-
-xkbset: getargs.o print.o usage.o main.o misc.o
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} getargs.o print.o usage.o main.o misc.o -o $@ ${LIBS}
-
-getargs.o: getargs.c xkbset.h
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} -c getargs.c
-
-print.o: print.c xkbset.h
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} -c print.c
-
-usage.o: usage.c xkbset.h
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} -c usage.c
-
-main.o: main.c xkbset.h
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} -c main.c
-
-misc.o: misc.c xkbset.h
- ${CC} ${CFLAGS} ${INC_PATH} ${LIB_PATH} -c misc.c
-
-getargs.c: create_getargs config_getargs
- perl create_getargs
-
-print.c: create_print config_print
- perl create_print
-
-usage.c: create_usage config_usage
- perl create_usage
-
-config_usage: config_getargs
- rm -f config_usage
- ln -s config_getargs config_usage
-
-xkbset.1: xkbset.man
- cp xkbset.man xkbset.1
-
-INSTALL= install -c
-INSTALL_DATA= ${INSTALL}
-INSTALL_SCRIPT= ${INSTALL}
-INSTALL_PROGRAM=${INSTALL} -s
-
-install: all
- ${INSTALL_PROGRAM} xkbset ${INSTALL_BIN}
- ${INSTALL_SCRIPT} xkbset-gui ${INSTALL_BIN}
- ${INSTALL_DATA} xkbset.1 ${INSTALL_MAN1}
-
-clean:
- rm -f *.o getargs.c print.c usage.c *.core xkbset config_usage xkbset.1
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..07f17b1
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,57 @@
+#
+# Copyright 2005 Red Hat, Inc.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Red Hat not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Red Hat makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+bin_PROGRAMS = xkbset
+
+AM_CFLAGS = $(CWARNFLAGS)
+
+xkbset_SOURCES = getargs.c \
+ main.c \
+ misc.c \
+ print.c \
+ usage.c \
+ xkbset.h
+xkbset_CFLAGS = $(XKBSET_CFLAGS) $(AM_CFLAGS)
+xkbset_LDADD = $(XKBSET_LIBS)
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = xkbset.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..e81f989
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..47403c1
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,43 @@
+
+dnl Copyright 2005 Red Hat, Inc.
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Red Hat not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Red Hat makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([xkbset], [1.0.3],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xkbset])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+
+AC_CONFIG_HEADERS([config.h])
+
+AM_PROG_CC_C_O
+
+PKG_CHECK_MODULES(XKBSET, xproto x11)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT