summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-06-09 17:49:25 +0200
committerJulien Cristau <jcristau@debian.org>2010-06-09 18:32:39 +0200
commit59a7d41a255a6b9d7738245983e5c775a7147f08 (patch)
tree097f9f87855fe5589445bb231e614a7a52f7258d
parent92e8aea8967bbe597cc7bd72ef3306fc482d0133 (diff)
Add the X11 protocol spec to the build system
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac3
-rw-r--r--specs/XProtocol/Makefile25
-rw-r--r--specs/XProtocol/Makefile.am32
4 files changed, 35 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index 9f5a47e..4204f6a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,7 +20,7 @@
#
# Process this file with autoconf to create configure.
-SUBDIRS = man sgml
+SUBDIRS = man sgml specs/XProtocol
x11docdir = @X11DOCDIR@
dist_x11doc_DATA = MAINTAINERS
@@ -92,12 +92,6 @@ EXTRA_DIST = \
specs/XKB/XKBlib/title.fm5 \
specs/XKB/XKBlib/XKBlib.book \
specs/XLFD/xlfd.tbl.ms \
- specs/XProtocol/glossary \
- specs/XProtocol/indexmacros.t \
- specs/XProtocol/postproc \
- specs/XProtocol/X11.encoding \
- specs/XProtocol/X11.keysyms \
- specs/XProtocol/X11.protocol \
specs/Xserver/analysis.tex \
specs/Xserver/appgroup.ms \
specs/Xserver/secint.tex \
diff --git a/configure.ac b/configure.ac
index 832719c..256cc5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,4 +66,5 @@ AC_OUTPUT([Makefile
sgml/graphics/Makefile
sgml/input/Makefile
sgml/platforms/Makefile
- sgml/security/Makefile])
+ sgml/security/Makefile
+ specs/XProtocol/Makefile])
diff --git a/specs/XProtocol/Makefile b/specs/XProtocol/Makefile
deleted file mode 100644
index 03291ea..0000000
--- a/specs/XProtocol/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-TBL = tbl
-EQN = eqn
-TROFF = groff -Tps
-MSMACROS = -ms
-UTIL = ../../util
-SRCS = $(UTIL)/macros.t X11.protocol X11.keysyms X11.encoding glossary postproc
-ISRCS = indexmacros.t $(UTIL)/indexmacros.t
-
-all: x11.pdf
-
-x11.pdf: proto.pdf proto.idx.pdf
- pdftk proto.pdf proto.idx.pdf cat output $@
-
-proto.pdf:
- $(TBL) $(SRCS) | $(EQN) | $(TROFF) $(MSMACROS) 2> index.raw | ps2pdf - proto.pdf
-
-proto.idx.pdf: proto.pdf
- tail -1 index.raw > index.pageno
- grep -v '^.pn ' index.raw | sort -f -t: +1 -3 +0n -1n | awk -f $(UTIL)/fixindex.awk | awk -f $(UTIL)/block.awk > index.troff
- cat $(ISRCS) index.troff | $(TROFF) -me | ps2pdf - proto.idx.pdf
- $(RM) index.troff index.pageno
-
-clean::
- $(RM) index.raw index.troff index.pageno proto.pdf proto.idx.pdf
-
diff --git a/specs/XProtocol/Makefile.am b/specs/XProtocol/Makefile.am
new file mode 100644
index 0000000..120c7e8
--- /dev/null
+++ b/specs/XProtocol/Makefile.am
@@ -0,0 +1,32 @@
+x11docdir = @X11DOCDIR@/specs/XProtocol
+
+TBL = tbl
+EQN = eqn
+TROFF = groff -Tps
+MSMACROS = -ms
+UTIL = $(top_srcdir)/util
+protoSRCS = X11.protocol X11.keysyms X11.encoding glossary postproc
+indexSRCS = indexmacros.t
+SRCS = $(UTIL)/macros.t $(protoSRCS)
+ISRCS = $(indexSRCS) $(UTIL)/indexmacros.t
+EXTRA_DIST = $(indexSRCS) $(protoSRCS)
+
+x11doc_DATA = x11.pdf proto.pdf proto.idx.pdf
+
+x11.pdf: proto.pdf proto.idx.pdf
+ pdftk proto.pdf proto.idx.pdf cat output $@
+
+proto.pdf index.raw: $(SRCS)
+ $(TBL) $^ | $(EQN) | $(TROFF) $(MSMACROS) 2> index.raw | ps2pdf - proto.pdf
+
+index.pageno: index.raw
+ tail -1 $< > $@
+
+index.troff: index.pageno $(UTIL)/block.awk $(UTIL)/fixindex.awk
+ grep -v '^.pn ' index.raw | sort -f -t: +1 -3 +0n -1n | awk -f $(UTIL)/fixindex.awk | awk -f $(UTIL)/block.awk > index.troff
+
+proto.idx.pdf: $(ISRCS) index.troff
+ cat $^ | $(TROFF) -me | ps2pdf - proto.idx.pdf
+
+CLEANFILES = proto.pdf proto.idx.pdf x11.pdf index.raw index.pageno index.troff
+