Update to doc to make it build using pkgsrc tools instead of FreeBSD ports.
[dragonfly.git] / share / mk / doc.project.mk
1 #
2 # $DragonFly: doc/share/mk/doc.project.mk,v 1.3 2006/08/06 20:58:06 justin Exp $
3 # Matches with: 
4 # $FreeBSD: doc/share/mk/doc.project.mk,v 1.26 2005/02/20 17:14:25 hrs Exp $
5 # This file includes the other makefiles, which contain enough
6 # knowledge to perform their duties without the system make files.
7 #
8
9 # ------------------------------------------------------------------------
10 #
11 # Document-specific variables:
12 #
13 #       DOC             This _must_ be set if there is a document to
14 #                       build.  It should be without prefix.
15 #
16 #       DOCFORMAT       Format of the document.  Defaults to docbook.
17 #                       docbook is also the only option currently.
18 #
19 #       MAINTAINER      This denotes who is responsible for maintaining
20 #                       this section of the project.  If unset, set to
21 #                       doc-team@DragonFlyBSD.org
22 #
23
24 # ------------------------------------------------------------------------
25 #
26 # User-modifiable variables:
27 #
28 #       PREFIX          Standard path to document-building applications
29 #                       installed to serve the documentation build
30 #                       process, usually by installing the docproj port
31 #                       or package.  Default is ${LOCALBASE} or /usr/local
32 #
33 #       NOINCLUDEMK     Whether to include the standard BSD make files,
34 #                       or just to emulate them poorly.  Set this if you
35 #                       aren't on DragonFlyBSD, or a compatible sibling.  By
36 #                       default is not set.
37 #
38
39 # ------------------------------------------------------------------------
40 #
41 # Make files included:
42 #
43 #       doc.install.mk  Installation specific information, including
44 #                       ownership and permissions.
45 #
46 #       doc.subdir.mk   Subdirectory related configuration, including
47 #                       handling "obj" builds.
48 #
49 #       doc.common.mk   targets and variables commonly used in doc/ and
50 #                       www/ tree.
51 #
52 # DOCFORMAT-specific make files, like:
53 #
54 #       doc.docbook.mk  Building and installing docbook documentation.
55 #                       Currently the only method.
56 #
57
58 # Document-specific defaults
59 DOCFORMAT?=     docbook
60 MAINTAINER?=    doc-team@DragonFlyBSD.org
61
62 # Master list of known target formats.  The doc.<format>.mk files implement 
63 # the code to convert from their source format to one or more of these target
64 # formats
65 ALL_FORMATS=    html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
66
67 # User-modifiable
68 LOCALBASE?=     /usr/pkg
69 PREFIX?=        ${LOCALBASE}
70 PRI_LANG?=      en
71
72 CP?=            /bin/cp
73 CAT?=           /bin/cat
74 ECHO_CMD?=      echo
75 LN?=            /bin/ln
76 MKDIR?=         /bin/mkdir
77 RM?=            /bin/rm
78 MV?=            /bin/mv
79 HTML2TXT?=      ${PREFIX}/bin/links
80 HTML2TXTOPTS?=  -dump -width 72 ${HTML2TXTFLAGS}
81 ISPELL?=        ispell
82 ISPELLOPTS?=    -l -p /usr/share/dict/freebsd ${ISPELLFLAGS}
83
84 .if exists(/usr/bin/perl)
85 PERL?=          /usr/bin/perl
86 .elif exists({$PREFIX}/bin/perl)
87 PERL?=          {$PREFIX}/bin/perl
88 .else
89 PERL?=          perl
90 .endif
91 REALPATH?=      /bin/realpath
92 SETENV?=        /usr/bin/env
93 XSLTPROC?=      ${PREFIX}/bin/xsltproc
94 TIDY?=          ${PREFIX}/bin/tidy
95 #
96 # In teTeX 3.0 and later, pdfetex(1) is used as the default TeX
97 # engine for JadeTeX and tex(1) cannot be used as ${TEX_CMD} anymore
98 # due to incompatibility of the format file.  Since the teTeX 3.0
99 # distribution has "${PREFIX}/share/texmf-dist/LICENSE.texmf,"
100 # it is checked here to determine which TeX engine should be used.
101 .if exists(${PREFIX}/share/texmf-dist/LICENSE.texmf)
102 TEX_CMD?=       ${PREFIX}/bin/etex
103 PDFTEX_CMD?=    ${PREFIX}/bin/pdfetex
104 .else
105 TEX_CMD?=       ${PREFIX}/bin/tex
106 PDFTEX_CMD?=    ${PREFIX}/bin/pdftex
107 .endif
108 LATEX_CMD?=     ${PREFIX}/bin/latex
109 JADETEX_CMD?=   ${TEX_CMD} "&jadetex"
110 PDFJADETEX_CMD?=${PDFTEX_CMD} "&pdfjadetex"
111 FOP_CMD?=       ${PREFIX}/share/fop/fop.sh
112 XEP_CMD?=       sh ${HOME}/XEP/xep.sh
113 JAVA_CMD?=      ${PREFIX}/bin/javavm
114 SAXON_CMD?=     ${JAVA_CMD} -jar ${PREFIX}/share/java/classes/saxon.jar
115
116
117 # Image processing (contains code used by the doc.<format>.mk files, so must
118 # be listed first).
119 .include "doc.images.mk"
120
121 # targets and variables commonly used in doc/ and www/ tree.
122 .include "doc.common.mk"
123
124 DOC_LOCAL_MK=   ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk
125
126 .if exists(${DOC_LOCAL_MK})
127 .include "${DOC_LOCAL_MK}"
128 .endif
129
130 # Ownership information.
131 .include "doc.install.mk"
132
133 # Format-specific configuration
134 .if defined(DOC)
135 .if ${DOCFORMAT} == "docbook"
136 .include "doc.docbook.mk"
137 .endif
138 .if ${DOCFORMAT} == "html"
139 .include "doc.html.mk"
140 .endif
141 .endif
142
143 # Subdirectory glue.
144 .include "doc.subdir.mk"