1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
|
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE and is |
# | available online at http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it online, please send a note to license@php.net so we can |
# | mail you a copy. |
# +----------------------------------------------------------------------+
# | Authors: Stig Bakken <ssb@fast.no> |
# +----------------------------------------------------------------------+
#
#
# $Id: Makefile.in,v 1.113 2002/02/09 23:51:38 jimw Exp $
#
all: html
# {{{ variables
VPATH=@srcdir@
srcdir=@srcdir@
scriptdir=@srcdir@/scripts
PHP_SOURCE=@PHP_SOURCE@
LANGCODE=@LANG@
LANG=@LANG@ -D .
JADE=@SP_OPTIONS@ @JADE@ -D . -wno-idref
NSGMLS=@SP_OPTIONS@ @NSGMLS@
PHP=@PHP@
CATALOG=@CATALOG@
VERSION="@PHP_VERSION@"
HTML_STYLESHEET=dsssl/html.dsl
PHPWEB_STYLESHEET=dsssl/phpweb.dsl
HOWTO_STYLESHEET=dsssl/howto.dsl
PRINT_STYLESHEET=dsssl/print.dsl
QUICKREF_STYLESHEET=dsssl/quickref.dsl
KDEVELOP_TOC_STYLESHEET=dsssl/kdevelop_toc.dsl
XMLDCL=$(srcdir)/dtds/dbxml-@DOCBOOK_VERSION@/phpdocxml.dcl
HTML_DEPS=$(HTML_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in dsssl/common.dsl.in zendapi
HOWTO_DEPS=$(HOWTO_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in dsssl/common.dsl.in howto/howto.ent
PRINT_DEPS=$(PRINT_STYLESHEET) dsssl/common.dsl.in dsssl/print.dsl.in zendapi
PHPWEB_DEPS=$(PHPWEB_STYLESHEET) dsssl/html-common.dsl dsssl/common.dsl zendapi
KDEVELOP_TOC_DEPS=dsssl/kdevelop_toc.dsl Makefile
DIST_FILES=@MANUAL@.tar.bz2 @MANUAL@.html.bz2 @MANUAL@.doc.pdb
MIRROR_TARGETS=php/index.php html/index.html $(DIST_FILES)
PDF_FILES=@MANUAL@.pdf.bz2
# }}}
@AUTOGENERATED_RULES@
entities: FORCE
$(srcdir)/scripts/entities.sh
manual.xml: $(srcdir)/manual.xml.in .manual.xml
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
.manual.xml: $(DEPEND_FILES) entities/global.ent
touch .manual.xml
zendapi:
@ZEND_FIGURES@
html: html/index.html
bightml: @MANUAL@.html
phpweb: php/index.php
rtf: @MANUAL@.rtf
tex latex: @MANUAL@.tex
dvi: @MANUAL@.dvi
ps: @MANUAL@.ps
pdf: @MANUAL@.pdf
howto: howto/html/index.html
howtotgz: howto/howto.html.tar.gz
funcindex: funcindex.xml
revcheck: revcheck.html
FORCE:
funclist.txt: FORCE
$(scriptdir)/genfunclist.sh $(PHP_SOURCE) > funclist.txt
funcsummary.txt: FORCE
$(scriptdir)/genfuncsummary.sh $(PHP_SOURCE) > funcsummary.txt
revcheck.html: FORCE
PHPDOCDIR=$(srcdir) $(PHP) -f $(scriptdir)/revcheck.php $(LANGCODE) > revcheck.html
funcindex.xml: quickref.txt
@if test "$(PHP)" = "no"; then \
echo "WARNING: recreating the function index needs php" ;\
echo " which was not found by configure" ;\
echo " reusing old file" ;\
touch funcindex.xml ;\
else \
echo "$(PHP) -q -d short_tags=off $(srcdir)/scripts/genfuncindex.php ../quickref.txt @ENCODING@ > funcindex.xml" ;\
$(PHP) -q -d short_tags=off $(srcdir)/scripts/genfuncindex.php ../quickref.txt @ENCODING@ > funcindex.xml ;\
fi
mirror-files: $(MIRROR_TARGETS)
extra-mirror-files: $(PDF_FILES) isilo
snapshot: manual-snapshot.tar.gz
manual-snapshot.tar.gz: @MANUAL@.html html/index.html @MANUAL@.rtf @MANUAL@.txt
tar -cvzf $@ @MANUAL@.html html/*.html @MANUAL@.rtf @MANUAL@.txt
status: ./funclist.txt
$(PHP) -q $(scriptdir)/checkdoc.php > status.txt
$(PHP) -q $(scriptdir)/checkdoc.php missing > missing.txt
summary: ./funcsummary.txt
quickref: quickref.txt
quickref.txt: FORCE
if test ! -e funcindex.xml; then touch funcindex.xml; fi
$(JADE) $(CATALOG) -d $(QUICKREF_STYLESHEET) -V nochunks -t sgml $(XMLDCL) manual.xml | sed -e 's/ */ /g' | sort -f > quickref.txt
kdevelop_toc: php.toc
php.toc: manual.xml $(KDEVELOP_TOC_DEPS)
echo '<!DOCTYPE gideontoc>' > $@
$(JADE) $(CATALOG) -d $(KDEVELOP_TOC_STYLESHEET) -V nochunks -t sgml $(XMLDCL) manual.xml | sed -e's/\& /\& /g' >> $@
scripts/makedoc: $(scriptdir)/makedoc.cc
mkdir -p scripts
g++ -o scripts/makedoc $(scriptdir)/makedoc.cc
# intermediate file for name change
.SECONDARY: @MANUAL@.xml
@MANUAL@.xml: manual.xml
cp manual.xml $@
@MANUAL@.html: @MANUAL@.xml $(HTML_DEPS)
html/index.html: manual.xml $(HTML_DEPS)
@test -d html || mkdir html
$(JADE) $(CATALOG) -d $(HTML_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
php/index.php: manual.xml $(PHPWEB_DEPS)
@test -d php || mkdir php
-$(JADE) $(CATALOG) -d $(PHPWEB_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
palmdoc: @MANUAL@.doc.pdb
@MANUAL@.doc.pdb: @MANUAL@.txt scripts/makedoc
scripts/makedoc -b @MANUAL@.txt @MANUAL@.doc.pdb @PALMDOCTITLE@
# Note: Isilo converter available only in binary from www.isilo.com
isilo: @MANUAL@.isilo.pdb
@MANUAL@.isilo.pdb: @MANUAL@.html
iSilo386 @MANUAL@.html @MANUAL@.isilo.pdb
@MANUAL@.zip: html/index.html
-rm -f $@ && (cd html; zip -9 -q ../$@ *.html)
@MANUAL@.tar.gz: html/index.html
-rm -f $@ && (cd html; tar -cf - *.html) | gzip -9 > $@
@MANUAL@.tar.bz2: html/index.html
-rm -f $@ && (cd html; tar -cf - *.html) | bzip2 -9 > $@
howto/html/index.html: howto/howto.xml $(HOWTO_DEPS)
@test -d howto/html || mkdir howto/html
-$(JADE) -i lang-en $(CATALOG) -d $(HOWTO_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) $(srcdir)/howto/howto.xml
howto/howto.html.tar.gz: howto/html/index.html $(HOWTO_DEPS)
tar -cvzf $@ howto/html/*.html
install.html: install.xml $(HTML_DEPS)
$(JADE) $(CATALOG) -V nochunks -d dsssl/install.dsl -t sgml $(XMLDCL) install.xml > $@
# File endings we are going to define general rules for:
.SUFFIXES: .html .xml .sgml .tex .dvi .ps .pdf .rtf .gz .bz2 .txt
.PRECIOUS: %.html %.dvi
# General rules:
%.rtf: %.xml
$(JADE) $(CATALOG) -d $(PRINT_STYLESHEET) -t rtf $(XMLDCL) $<
%.gz: %
gzip -9 -c $< > $@
%.bz2: %
bzip2 -9 -c $< > $@
%.zip: %
zip -9 $@ $<
%.pdf: %.dvi
dvipdfm -o $@ -p @PDF_PAPER_TYPE@ $<
%.ps: %.dvi
dvips -o $@ -t @PDF_PAPER_TYPE@ $<
%.html: %.xml
$(JADE) $(CATALOG) -V nochunks -d $(HTML_STYLESHEET) -t sgml $(XMLDCL) $< > $@
%.txt: %.html
lynx -nolist -dump file:`pwd`/$< > $@
%.tex: %.xml
$(JADE) $(CATALOG) -d $(PRINT_STYLESHEET) -t tex $(XMLDCL) $<
# general TeX->dvi ru
# runs three times -
# 1. generates the dvi with a completely bogus table of contents
# 2. generates the dvi with a table of contents that is off based on the size
# of the table of contents
# 3. generates a dvi with all the right page numbers and such
%.dvi : %.tex
# a hack around bugs in jade/jadetex...
mv $< $<.tmp
sed -e '/HeadingText/,/endHeadPar/ s/_/\\137/g' $<.tmp > $<
rm $<.tmp
-jadetex $<
-jadetex $<
-jadetex $<
# {{{ tests
# test all possible errors
test: manual.xml
@if test ! -e funcindex.xml; then touch funcindex.xml; fi
@if test ! -e entities/missing-entities.ent; then touch entities/missing-entities.ent; fi
@if test ! -e entities/missing-ids.xml; then touch entities/missing-ids.xml; fi
$(NSGMLS) -i lang-$(LANG) -s $(XMLDCL) manual.xml
# ignore missing IDs and check if the manual can be generated anyway
test_man_gen: manual.xml
@if test ! -e funcindex.xml; then touch funcindex.xml; fi
@if test ! -e entities/missing-entities.ent; then touch entities/missing-entities.ent; fi
@if test ! -e entities/missing-ids.xml; then touch entities/missing-ids.xml; fi
$(NSGMLS) -wno-idref -i lang-$(LANG) -s $(XMLDCL) manual.xml
# }}}
# {{{ cleanup
clean:
rm -rf html php fancy figures howto/html
rm -f @MANUAL@.txt [a-z]*.html @MANUAL@.rtf manual.info
rm -f @MANUAL@.zip @MANUAL@.tar.gz .manual.xml
rm -f manual_*.pdb @srcdir@/scripts/makedoc *.manifest
rm -f *.aux *.tex *.log *.dvi *.toc *.ps *.gz
rm -f status.txt missing.txt
rm -f entities/chapters.ent
rm -f entities/missing*
distclean: clean
for file in `find . -name "*.in"`; do rm `dirname $$file`/`basename $$file .in`; done
# }}}
|