From: Michael Orlitzky Date: Mon, 4 Dec 2017 13:28:55 +0000 (-0500) Subject: Use autotools for the build/dist system. X-Git-Tag: 0.0.1^0 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=97c5b4d178fb0066706fb4258c07f5f59c669d58;p=emacs-keys.git Use autotools for the build/dist system. --- diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..41a6b6a --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +EXTRA_DIST = doc + +consoledir = $(pkgdatadir) +nodist_console_DATA = $(srcdir)/src/console.map + +if XMODMAP + # Without this set, we won't try to install the Xmodmap file. + xmodmapdir = $(pkgdatadir) + nodist_xmodmap_DATA = $(srcdir)/src/Xmodmap +endif + +nodist_doc_DATA = $(srcdir)/doc/README diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3f026c4 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,2 @@ +#!/bin/sh +autoreconf --force --install diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..51b92a0 --- /dev/null +++ b/configure.ac @@ -0,0 +1,19 @@ +AC_INIT([emacs-keys], [0.0.1], [michael@orlitzky.com]) +AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz]) + +# --enable-Xmodmap flag, disabled by default, that decides whether or +# not we install the Xmodmap file. +AC_ARG_ENABLE( + [Xmodmap], + [ --enable-Xmodmap install the Xmodmap file [[default=no]]], + [case "${enableval}" in + yes) xmodmap=true ;; + no) xmodmap=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-xmodmap]) ;; + esac],[xmodmap=false]) + AM_CONDITIONAL([XMODMAP], [test x$xmodmap = xtrue]) + +# List of output files. +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT diff --git a/makefile b/makefile deleted file mode 100644 index 87c6ccc..0000000 --- a/makefile +++ /dev/null @@ -1,11 +0,0 @@ -PN = emacs-keys -PREFIX := /usr/local - -# So that "make" doesn't try to install stuff. -all: - -install-console: $(DESTDIR)$(PREFIX)/share/$(PN)/console.map -install-xorg: $(DESTDIR)$(PREFIX)/share/$(PN)/Xmodmap - -$(DESTDIR)$(PREFIX)/share/$(PN)%: src/% - install -D --mode=644 $< $@