summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/Makefile.am34
1 files changed, 34 insertions, 0 deletions
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) < $< > $@