2
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4
# Permission to use, copy, modify, distribute, and sell this software and its
5
# documentation for any purpose is hereby granted without fee, provided that
6
# the above copyright notice appear in all copies and that both that
7
# copyright notice and this permission notice appear in supporting
10
# The above copyright notice and this permission notice shall be included
11
# in all copies or substantial portions of the Software.
13
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19
# OTHER DEALINGS IN THE SOFTWARE.
21
# Except as contained in this notice, the name of the copyright holders shall
22
# not be used in advertising or otherwise to promote the sale, use or
23
# other dealings in this Software without prior written authorization
24
# from the copyright holders.
27
# Based on xc/doc/specs/*/Makefile from X11R6.9
29
EXTRA_DIST = $(doc_sources)
32
printable_format = .pdf
34
printable_format = .ps
38
doc_DATA = $(doc_sources:.ms=.txt) \
39
$(doc_sources:.ms=$(printable_format)) \
40
$(doc_sources:.ms=.html)
42
CLEANFILES = $(doc_DATA)
43
MOSTLYCLEANFILES = index.*
45
# Pass version string as a troff string for substitution
46
GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
48
# -e to run through eqn, -t to run through tbl
49
GROFF_FLAGS = -e -t -ms $(GROFF_DEFS) -I$(srcdir) $(top_srcdir)/specs/macros.t
51
SUFFIXES = .ms .ps .txt .html .pdf
54
-$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
55
@if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
56
else test $$? -le 1; fi
59
$(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
60
$< 2> index.$@.raw > $@
63
$(AM_V_GEN) $(GROFF) -Thtml $(GROFF_FLAGS) $< 2> index.$@.raw > $@
66
$(AM_V_GEN) $(PS2PDF) $< $@