summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-06-17 11:15:12 -0400
committerGaetan Nadon <memsize@videotron.ca>2011-06-18 14:33:28 -0400
commita81fab654085239ffcc4981b6bdab9fc18ec3d08 (patch)
treed97180afd3cfa730a27d27842b689b3362b65a26 /Makefile.am
parent8e6cc68283518bba2820ff0d919aee9d49e3eb59 (diff)
Use XORG_MANPAGE_SECTIONS rather than cpprules.in to build man pages
As for all other manpages, use sed rather than the C preprocessor from the Imake days. Use SCOMAN Automake variable and groff .if for conditional text We can therefore remove ARCHMANDEFS Remove man page related code from cpprules.in Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index bd35ef7..6c4ef24 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,15 +30,24 @@ xinit_SOURCES = \
xinit.c
appmandir = $(APP_MAN_DIR)
-
-appman_PRE = \
- startx.man \
- xinit.man
-
-appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
+appman_PRE = startx.man xinit.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+MAN_SUBSTS+= -e 's|__XSERVERNAME__|$(XSERVERNAME)|g' \
+ -e 's|__XCONFIGFILE__|$(XCONFIGFILE)|g' \
+ -e 's|__XCONFIGFILEMAN__|$(XCONFIGFILEMAN)|g' \
+ -e 's|__xinitdir__|$(XINITDIR)|g' \
+ -e 's|__bindir__|$(bindir)|g' \
+ -e 's|__libdir__|$(libdir)|g' \
+ -e 's|__SCOMAN__|$(SCOMAN)|g'
include $(top_srcdir)/cpprules.in
+SUFFIXES += .$(APP_MAN_SUFFIX) .man
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
xinitrcdir = $(XINITDIR)
PROGCPPDEFS = \