2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A
2N/A# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2N/A
2N/APWD:sh = pwd
2N/A
2N/ARST2HTML_FLAGS = --rfc-references \
2N/A --no-generator \
2N/A --time \
2N/A --stylesheet-path=$(CSS) \
2N/A --link-stylesheet
2N/A
2N/ARST2LATEX = rst2latex.py
2N/A
2N/ARST2LATEX_FLAGS = --documentclass=ireport --documentoptions=12pt
2N/A
2N/Adraft := RST2LATEX_FLAGS = --documentclass=idraft --documentoptions=12pt
2N/A
2N/A.MAKE.STATE:
2N/A
2N/AM4_ARGS = -DCOMPLETE=1
2N/A
2N/AWEB_INCLUDES = macros.rsi web.css
2N/A
2N/Aoutput/%.rsi: output %.rst
2N/A gm4 $(M4_ARGS) $< > $@
2N/A
2N/A
2N/ATXT_FRAGMENTS = \
2N/A apt.txt \
2N/A catalog.txt \
2N/A deduction.txt \
2N/A elf-jar-handling.txt \
2N/A es-requirements.txt \
2N/A file-metadata.txt \
2N/A filter.txt \
2N/A image.txt \
2N/A multi-platform.txt \
2N/A one-pager-main.txt \
2N/A protocol-versioning.txt \
2N/A publication.txt \
2N/A razor.txt \
2N/A rest.txt \
2N/A rfes.txt \
2N/A transaction-order.txt \
2N/A usr-setuid-bins.txt \
2N/A versions.txt \
2N/A wos-conversion.txt \
2N/A wos-filetype-stats.txt \
2N/A xml.txt
2N/A
2N/ARST_FRAGMENTS = \
2N/A actions.rst \
2N/A depot.rst \
2N/A guide-basic-ops.rst \
2N/A guide-implementation-depot.rst \
2N/A guide-metadata-conventions.rst \
2N/A guide-naming-conventions.rst \
guide-pkg-states.rst \
guide-publication-protocol.rst \
guide-repository-format.rst \
guide-retrieval-protocol.rst \
guide-txn-states.rst \
RST_JOINS = \
guide-main.rst
CSS=pkg-guide-web.css
HTML_DIR = html-out
FILE_URL = file://$(PWD)/$(HTML_DIR)
HTML_CSS = $(HTML_DIR)/$(CSS)
HTML_FRAGMENTS = $(RST_FRAGMENTS:%.rst=$(HTML_DIR)/%.html)
HTML_JOINS = $(RST_JOINS:%.rst=$(HTML_DIR)/%.html)
.KEEP_STATE:
pdf: guide-main.pdf
draft: pdf
html: $(HTML_DIR) .WAIT $(HTML_CSS) $(HTML_FRAGMENTS) $(HTML_JOINS)
$(HTML_JOINS): $(HTML_FRAGMENTS)
html-out:
-mkdir $@
# If we are embedding stylesheets, then we may wish to have this rule also
# depend on $(CSS).
$(HTML_DIR)/%.html: %.rst macros.rst
rst2html.py $(RST2HTML_FLAGS) $< > $@
$(HTML_DIR)/$(CSS): $(CSS)
cp $(CSS) $@
%.pdf: %.rst macros.rst $(RSI_INCLUDES)
$(RST2LATEX) $(RST2LATEX_FLAGS) $< > $(<:%.rst=%.tex)
pdflatex $(<:%.rst=%.tex)
pdflatex $(<:%.rst=%.tex)
clean:
rm -f $(HTML_FRAGMENTS) $(RSI_INCLUDES)
clobber: clean