summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-10-14 01:28:06 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-10-14 01:28:06 +0000
commit946902bf607734c4253dab800d45691b10f7dd37 (patch)
tree64ae47a93a99ea0ff0e07887a330f79f7a7d55ec /Makefile.am
parent4ec4f04ad354b019532f3603de9e2d03081fdd85 (diff)
Use cpp to fill in variables in man pages
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am22
1 files changed, 17 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 6f48723..c789212 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,13 +72,25 @@ rstartd: server.cpp
# man pages
-dist_man1_MANS = \
- rstartd.man \
- rstart.man
+appmandir = $(mandir)/man$(APP_MAN_SUFFIX)
+appman_SOURCES = rstartd.man rstart.man
+appman_DATA = $(appman_SOURCES:man=$(APP_MAN_SUFFIX))
-EXTRA_DIST = client.cpp server.cpp config.cpp
+# Strings to replace in man pages
+XORGRELSTRING = @PACKAGE_STRING@
+ XORGMANNAME = X Version 11
+ MANDEFS = -D__projectroot__=$(prefix) \
+ -D__xorgversion__='"$(XORGRELSTRING)" "$(XORGMANNAME)"'
-CLEANFILES = rstart rstartd config
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+.man.$(APP_MAN_SUFFIX):
+ $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@
+
+
+EXTRA_DIST = client.cpp server.cpp config.cpp $(appman_SOURCES)
+
+CLEANFILES = rstart rstartd config $(appman_DATA)
#
# commands and contexts