1# 2# $Id$ 3# 4# Copyright 2014, Juniper Networks, Inc. 5# All rights reserved. 6# This SOFTWARE is licensed under the LICENSE provided in the 7# ../Copyright file. By downloading, installing, copying, or otherwise 8# using the SOFTWARE, you agree to be bound by the terms of that 9# LICENSE. 10 11if HAVE_OXTRADOC 12OXTRADOC_DIR = ${SLAX_OXTRADOCDIR} 13OXTRADOC_PREFIX = ${OXTRADOC_DIR} 14OXTRADOC = ${OXTRADOC_DIR}/oxtradoc 15SLAXPROC_BINDIR = ${SLAX_BINDIR} 16 17XML2RFC = ${OXTRADOC_DIR}/xml2rfc.tcl 18XML2HTMLDIR = ${OXTRADOC_DIR} 19XML2HTMLBIN = ${XML2HTMLDIR}/rfc2629-to-html.slax 20SLAXPROC = ${SLAX_BINDIR}/slaxproc 21 22SLAXPROC_ARGS = \ 23 -a oxtradoc-dir ${OXTRADOC_DIR} \ 24 -a oxtradoc-install-dir ${OXTRADOC_DIR} \ 25 -a anchor-prefix docs 26 27SLAXPROC_ARGS_INLINE = \ 28 -a oxtradoc-inline yes 29 30SLAXPROC_ARGS += ${SLAXPROC_ARGS_INLINE} 31 32XML2HTML = \ 33 ${SLAXPROC} -g -e -I ${OXTRADOC_DIR} -I . \ 34 ${SLAXPROC_ARGS} \ 35 ${XML2HTMLBIN} 36 37OX_ARGS = -P ${OXTRADOC_PREFIX} -L ${OXTRADOC_PREFIX} 38OX_ARGS += -S ${SLAXPROC} -p doc 39OX_CMD = ${PERL} ${PERLOPTS} ${OXTRADOC} ${OX_ARGS} 40OXTRADOC_CMD = ${OX_CMD} 41 42OUTPUT = libxo-manual 43INPUT = libxo 44 45EXTRA_DIST = \ 46 ${INPUT}.txt \ 47 ${OUTPUT}.html \ 48 ${OUTPUT}.txt 49 50doc docs: ${OUTPUT}.txt ${OUTPUT}.html 51 52${OUTPUT}.txt: ${INPUT}.txt ${OXTRADOC} xolint.txt 53 ${OXTRADOC_CMD} -m text -o $@ $< 54 55${OUTPUT}.html: ${INPUT}.txt ${OXTRADOC} ${XML2HTMLBIN} xolint.txt 56 ${OXTRADOC_CMD} -m html -o $@ $< 57 58xolint.txt: ${top_srcdir}/xolint/xolint.pl 59 perl ${top_srcdir}/xolint/xolint.pl -D > xolint.txt 60 61CLEANFILES = \ 62xolint.txt \ 63${INPUT}.xml \ 64${INPUT}.txt \ 65${INPUT}.fxml \ 66${INPUT}.html 67else 68doc docs: 69 @${ECHO} "The 'oxtradoc' tool is not installed; see libslax.org" 70endif 71