summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2005-12-10 16:29:07 +0000
committerKevin E Martin <kem@kem.org>2005-12-10 16:29:07 +0000
commitb9464aa563b650faefbb881d5b399659aa8c30bb (patch)
tree10f33e6c55c39190997472b0040a677e4a80aac3
parent6be3ca4fb0d0f9a1361d45dfc094f0a7a85b27b4 (diff)
Add configure option to install makestrs and its manpage.MODULAR_COPY
Add makestrs man page.
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac6
-rw-r--r--util/Makefile.am34
3 files changed, 48 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e6a568a..b1cf654 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-12-10 Kevin E. Martin <kem-at-freedesktop-dot-org>
+
+ * configure.ac:
+ Add configure option to install makestrs and its manpage.
+
+ * util/Makefile.am:
+ Add makestrs man page.
+
2005-12-07 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
diff --git a/configure.ac b/configure.ac
index cde938f..8a7a5af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,12 @@ if test "x$XKB" = "xyes" ; then
AC_DEFINE(XKB, 1, [Define to 1 to use XKB for keysym resolution.])
fi
+AC_ARG_ENABLE(install-makestrs,
+ AC_HELP_STRING([--disable-install-makestrs], [Disable installing makestrs]),
+ INSTALL_MAKESTRS="$enableval",
+ INSTALL_MAKESTRS="yes")
+AM_CONDITIONAL([INSTALL_MAKESTRS], [test "x$INSTALL_MAKESTRS" = xyes])
+
# Replaces XFileSearchPathDefault from Imake configs
XFILESEARCHPATHDEFAULT='$(sysconfdir)/X11/%L/%T/%N%C%S:$(sysconfdir)/X11/%l/%T/%N%C%S:$(sysconfdir)/X11/%T/%N%C%S:$(sysconfdir)/X11/%L/%T/%N%S:$(sysconfdir)/X11/%l/%T/%N%S:$(sysconfdir)/X11/%T/%N%S:$(datadir)/X11/%L/%T/%N%C%S:$(datadir)/X11/%l/%T/%N%C%S:$(datadir)/X11/%T/%N%C%S:$(datadir)/X11/%L/%T/%N%S:$(datadir)/X11/%l/%T/%N%S:$(datadir)/X11/%T/%N%S:$(libdir)/X11/%L/%T/%N%C%S:$(libdir)/X11/%l/%T/%N%C%S:$(libdir)/X11/%T/%N%C%S:$(libdir)/X11/%L/%T/%N%S:$(libdir)/X11/%l/%T/%N%S:$(libdir)/X11/%T/%N%S'
diff --git a/util/Makefile.am b/util/Makefile.am
index d3f6ecf..2c13f0b 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -1,4 +1,8 @@
+if INSTALL_MAKESTRS
+bin_PROGRAMS = makestrs
+else
noinst_PROGRAMS = makestrs
+endif
EXTRA_DIST = \
Shell.ht \
@@ -7,3 +11,33 @@ EXTRA_DIST = \
string.list
makestrs_CFLAGS = $(XT_CFLAGS)
+makestrs_SOURCES = makestrs.c
+
+
+# Man page
+appmandir = $(APP_MAN_DIR)
+
+appman_PRE = makestrs.man
+
+if INSTALL_MAKESTRS
+appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+else
+noinst_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+endif
+
+EXTRA_DIST += $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+
+SED = sed
+
+# Strings to replace in man pages
+XORGRELSTRING = @PACKAGE_STRING@
+ XORGMANNAME = X Version 11
+
+MAN_SUBSTS = \
+ -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|'
+
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+.man.$(APP_MAN_SUFFIX):
+ sed $(MAN_SUBSTS) < $< > $@