summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-01-09 20:27:50 -0500
committerKeith Packard <keithp@keithp.com>2011-01-18 15:10:21 -0800
commit3f4c71799b3164440624d09b7b631d3d3c0a29ef (patch)
tree81aac371b4229d162a805083e87866f95305aeac
parentb8492e18a7e5322c4a492f6cf6cfeb5b0221d994 (diff)
XWin: build XWin man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Now can be built easily on any platform in the man directory Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--configure.ac1
-rw-r--r--hw/xwin/.gitignore3
-rw-r--r--hw/xwin/Makefile.am27
-rw-r--r--hw/xwin/man/Makefile.am21
-rw-r--r--hw/xwin/man/XWin.man (renamed from hw/xwin/XWin.man.pre)0
-rw-r--r--hw/xwin/man/XWinrc.man (renamed from hw/xwin/XWinrc.man.pre)0
6 files changed, 25 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac
index cab7fa740..81e5a8e00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2246,6 +2246,7 @@ hw/xnest/Makefile
hw/xnest/man/Makefile
hw/xwin/Makefile
hw/xwin/glx/Makefile
+hw/xwin/man/Makefile
hw/xquartz/Makefile
hw/xquartz/GL/Makefile
hw/xquartz/bundle/Makefile
diff --git a/hw/xwin/.gitignore b/hw/xwin/.gitignore
index a8c3a286b..bc4986cb4 100644
--- a/hw/xwin/.gitignore
+++ b/hw/xwin/.gitignore
@@ -1,6 +1,3 @@
-# Add & Override for this directory and it's subdirectories
winprefslex.c
winprefsyacc.c
winprefsyacc.h
-XWin.man
-XWinrc.man
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 232d65e86..f6a75df2c 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -156,7 +156,7 @@ winprefsyacc.h: winprefsyacc.c
winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c
-CLEANFILES = $(BUILT_SOURCES) $(appman_DATA) $(fileman_DATA) XWin.man XWinrc.man
+CLEANFILES = $(BUILT_SOURCES)
AM_YFLAGS = -d
AM_LFLAGS = -i
@@ -165,34 +165,13 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
-I$(top_srcdir) \
-Wno-bad-function-cast
-MAN_SRCS = XWin.man.pre XWinrc.man.pre
-
-appmandir = $(APP_MAN_DIR)
-appman_DATA = XWin.$(APP_MAN_SUFFIX)
-
-filemandir = $(FILE_MAN_DIR)
-fileman_DATA = XWinrc.$(FILE_MAN_SUFFIX)
-
-XWin.$(APP_MAN_SUFFIX): XWin.man
- -$(AM_V_at)rm -f XWin.$(APP_MAN_SUFFIX)
- $(AM_V_at)$(LN_S) XWin.man XWin.$(APP_MAN_SUFFIX)
-
-XWinrc.$(FILE_MAN_SUFFIX): XWinrc.man
- -$(AM_V_at)rm -f XWinrc.$(FILE_MAN_SUFFIX)
- $(AM_V_at)$(LN_S) XWinrc.man XWinrc.$(FILE_MAN_SUFFIX)
-
-EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir)
-
xwinconfigdir = $(sysconfdir)/X11
xwinconfig_DATA = system.XWinrc
-include $(top_srcdir)/cpprules.in
-
install-exec-hook:
(cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) XWin$(EXEEXT) X)
EXTRA_DIST = \
- $(MAN_SRCS) \
$(xwinconfig_DATA) \
X.ico \
XWin.rc \
@@ -220,5 +199,5 @@ EXTRA_DIST = \
relink:
$(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT)
-SUBDIRS = $(GLX_DIR) .
-DIST_SUBDIRS = glx .
+SUBDIRS = man $(GLX_DIR) .
+DIST_SUBDIRS = man glx .
diff --git a/hw/xwin/man/Makefile.am b/hw/xwin/man/Makefile.am
new file mode 100644
index 000000000..98a89a5f7
--- /dev/null
+++ b/hw/xwin/man/Makefile.am
@@ -0,0 +1,21 @@
+appmandir = $(APP_MAN_DIR)
+appman_PRE = XWin.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+filemandir = $(FILE_MAN_DIR)
+fileman_PRE = XWinrc.man
+fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
+
+EXTRA_DIST = $(appman_PRE) $(fileman_PRE)
+CLEANFILES = $(appman_DATA) $(fileman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+MAN_SUBSTS += -e 's|__logdir__|$(logdir)|g' \
+ -e 's|__datadir__|$(datadir)|g' \
+ -e 's|__sysconfdir__|$(sysconfdir)|g'
+
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+.man.$(FILE_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/hw/xwin/XWin.man.pre b/hw/xwin/man/XWin.man
index 51268f69a..51268f69a 100644
--- a/hw/xwin/XWin.man.pre
+++ b/hw/xwin/man/XWin.man
diff --git a/hw/xwin/XWinrc.man.pre b/hw/xwin/man/XWinrc.man
index 5c1fb979b..5c1fb979b 100644
--- a/hw/xwin/XWinrc.man.pre
+++ b/hw/xwin/man/XWinrc.man