File: Makefile.in

package info (click to toggle)
php-doc 20061001-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 45,764 kB
  • ctags: 1,611
  • sloc: xml: 502,485; php: 7,645; cpp: 500; makefile: 297; perl: 161; sh: 141; awk: 28
file content (364 lines) | stat: -rw-r--r-- 12,017 bytes parent folder | download
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# +----------------------------------------------------------------------+
# | PHP Version 4                                                        |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2006 The PHP Group                                |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.0 of the PHP license,       |
# | that is bundled with this package in the file LICENSE, and is        |
# | available through the world-wide-web at the following url:           |
# | http://www.php.net/license/3_0.txt.                                  |
# | If you did not receive a copy of the PHP license and are unable to   |
# | obtain it through the world-wide-web, please send a note to          |
# | license@php.net so we can mail you a copy immediately.               |
# +----------------------------------------------------------------------+
# | Authors: Stig Bakken <ssb@fast.no>                                   |
# +----------------------------------------------------------------------+
#

#
# $Id: Makefile.in,v 1.172 2006/09/06 20:40:36 sean Exp $
#

all: html

# {{{ variables

VPATH=@srcdir@

srcdir=@srcdir@
scriptdir=@srcdir@/scripts
PHP_SOURCE=@PHP_SOURCE@
PECL_SOURCE=@PECL_SOURCE@
LANGCODE=@LANG@
LANGDIR=@LANGDIR@
LANG=@LANG@ -D .
JADE=@SP_OPTIONS@ @JADE@ -D . -wno-idref
NSGMLS=@SP_OPTIONS@ @NSGMLS@
PHP=@PHP@
XSLTPROC=@XSLTPROC@
XMLLINT=@XMLLINT@

CATALOG=@CATALOG@

HTML_STYLESHEET=dsssl/html.dsl
PHPWEB_STYLESHEET=dsssl/phpweb.dsl
HOWTO_STYLESHEET=dsssl/howto.dsl
HOWTOPHP_STYLESHEET=dsssl/howto-php.dsl
PRINT_STYLESHEET=dsssl/print.dsl
KDEVELOP_TOC_STYLESHEET=dsssl/kdevelop_toc.dsl
XMLDCL=$(srcdir)/dtds/dbxml-4.1.2/phpdocxml.dcl

CHM_XSL_SHEET=xsl/htmlhelp.xsl
HOWTO_XSL_SHEET=xsl/howto.xsl
QUICKREF_XSL_SHEET=xsl/quickref.xsl
XUL_XSL_SHEET=xsl/htmlhelp.xsl

BIGHTML_DEPS=$(HTML_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in dsssl/common.dsl.in zendapi
HTML_DEPS=$(HTML_STYLESHEET) dsssl/html-common.dsl dsssl/html-locale.dsl.in dsssl/common.dsl.in zendapihtml
HOWTO_DEPS=$(HOWTO_STYLESHEET) $(HOWTOPHP_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 zendapiphp
KDEVELOP_TOC_DEPS=dsssl/kdevelop_toc.dsl Makefile

DIST_FILES=@MANUAL@.tar.gz @MANUAL@.html.gz
MIRROR_TARGETS=php/index.php html/index.html $(DIST_FILES)
#MIRROR_TARGETS=phpweb_xsl html/index.html $(DIST_FILES)


PDF_FILES=@MANUAL@.pdf.bz2

HACK_RTL_LANGS_PAGES=@HACK_RTL_LANGS_PAGES@
HACK_RTL_LANGS_PHPWEB=@HACK_RTL_LANGS_PHPWEB@
# }}}

@AUTOGENERATED_RULES@

entities: FORCE
	$(PHP) -c $(scriptdir) -q $(scriptdir)/entities.php

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:
	cp $(srcdir)/en/internals/zendapi/figures/*.png .

zendapihtml: 
	rm -rf html && mkdir html && mkdir html/figures
	cp $(srcdir)/en/internals/zendapi/figures/*.png ./html/figures

zendapixul: 
	rm -rf xul && mkdir xul
	@if test "@FIGURES@" != ""; then mkdir xul/@FIGURES@ ; fi
	@ZEND_FIGURES_HTML@

zendapiphp: 
	rm -rf php && mkdir php && mkdir php/figures
	cp $(srcdir)/en/internals/zendapi/figures/*.png ./php/figures

zendapihtmlhelp: 
	rm -rf ./htmlhelp/html && mkdir ./htmlhelp/html && mkdir htmlhelp/html/figures
	cp $(srcdir)/en/internals/zendapi/figures/*.png ./htmlhelp/html/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
howtophp: howto/php/index.php
howtotgz: howto/howto.html.tar.gz
funcindex: funcindex.xml
revcheck: revcheck.html

FORCE:

funclist.txt: FORCE
	@if test "$(PHP_SOURCE)" = "no"; then \
	    echo "WARNING: recreating the function list needs php sources" ;\
	    echo "         which were not found by configure" ;\
	    echo "         aborting " ;\
	else \
	    $(PHP) -C -q $(scriptdir)/genfunclist.php $(PHP_SOURCE) > funclist.txt ;\
	fi; \
        if test "$(PECL_SOURCE)" = "no" -a ! "$(PHP_SOURCE)" = "no"; then \
            echo "WARNING: pecl sources not found - pecl functions" ;\
            echo "         will not be present in funclist.txt" ;\
        elif test ! "$(PHP_SOURCE)" = "no"; then \
            echo ""  >> funclist.txt ;\
            echo "# --------- PECL Stuff --------- " >> funclist.txt ;\
            $(PHP) -C -q $(scriptdir)/genfunclist.php $(PECL_SOURCE) >> funclist.txt ;\
        fi

funcsummary.txt: FORCE
	$(PHP) -C -q $(scriptdir)/genfuncsummary.php $(PHP_SOURCE) > funcsummary.txt

revcheck.html: FORCE
	PHPDOCDIR=$(srcdir) $(PHP) -c $(scriptdir) -f $(scriptdir)/revcheck.php $(LANGDIR) > revcheck.html

funcindex.xml: FORCE
	@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 \
	$(XSLTPROC) -o quickref-temp.txt $(QUICKREF_XSL_SHEET) manual.xml ;\
	echo "$(PHP) -q $(scriptdir)/genfuncindex.php quickref-temp.txt > funcindex.xml" ;\
	$(PHP) -q $(scriptdir)/genfuncindex.php quickref-temp.txt > funcindex.xml ;\
	rm -f quickref-temp.txt ;\
	fi

mirror-files: $(MIRROR_TARGETS)
#extra-mirror-files: $(PDF_FILES) isilo
extra-mirror-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 ! -f funcindex.xml; then touch funcindex.xml; fi 
	$(XSLTPROC) -o quickref.txt $(QUICKREF_XSL_SHEET) manual.xml

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/\& /\&amp; /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 $(BIGHTML_DEPS)

html/index.html: manual.xml $(HTML_DEPS)
	$(PHP) -q $(scriptdir)/rtlpatch/hackmanuallang.php $(LANGDIR)
	$(JADE) $(CATALOG) -d $(HTML_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
	$(PHP) -q $(scriptdir)/html_syntax.php html html/
	$(PHP) -q $(scriptdir)/rtlpatch/hackmanuallang.php en
	$(HACK_RTL_LANGS_PAGES)

# still needs more tweaks!!
html_xsl: manual.xml zendapihtml
	${XSLTPROC} xsl/html.xsl manual.xml

xul_xsl: manual.xml zendapixul
	${XSLTPROC} xsl/xul.xsl manual.xml

bightml_xsl: manual.xml zendapi
	${XSLTPROC} -o @MANUAL@.html xsl/bightml.xsl manual.xml

fo: manual.xml zendapi
	${XSLTPROC} -o manual.fo xsl/fo.xsl manual.xml

howto_xsl:
	rm -rf ./howto/html && mkdir ./howto/html
	${XSLTPROC} $(HOWTO_XSL_SHEET) ./howto/howto.xml

chm_xsl: manual.xml zendapihtmlhelp
	${XSLTPROC} $(CHM_XSL_SHEET) manual.xml
 
phpweb_xsl: manual.xml zendapiphp
	${XSLTPROC} $(srcdir)/xsl/phpweb.xsl manual.xml
	$(PHP) -q $(scriptdir)/fixphpweb.php `pwd`/php

php/index.php: manual.xml $(PHPWEB_DEPS)
	$(PHP) -q $(scriptdir)/phpweb-entities.php `pwd` phpweb
	$(PHP) -q $(scriptdir)/rtlpatch/hackmanuallang.php $(LANGDIR)
	-$(JADE) $(CATALOG) -d $(PHPWEB_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) manual.xml
	$(PHP) -q $(scriptdir)/html_syntax.php php php/
	$(PHP) -q $(scriptdir)/rtlpatch/hackmanuallang.php en
	$(PHP) -q $(scriptdir)/phpweb-entities.php `pwd` remove
	$(HACK_RTL_LANGS_PHPWEB)

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 -R -9 -q ../$@ *.html *.png)

@MANUAL@.tar.gz: html/index.html
	-rm -f $@ && (tar -cf - html) | gzip -9 > $@

@MANUAL@.tar.bz2: html/index.html
	-rm -f $@ && (tar -cf - html) | bzip2 -9 > $@

howto/php/index.php: howto/howto.xml $(HOWTO_DEPS)
	@test -d howto/php || mkdir howto/php
	-$(JADE) -i lang-en $(CATALOG) -d $(HOWTOPHP_STYLESHEET) -V use-output-dir -t sgml $(XMLDCL) $(srcdir)/howto/howto.xml

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 > $@

chm: html FORCE
	chm/make_chm.bat $(LANG)

# 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 ! -f funcindex.xml; then touch funcindex.xml; fi 
	@if test ! -f entities/missing-entities.ent; then touch entities/missing-entities.ent; fi 
	@if test ! -f 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 ! -f funcindex.xml; then touch funcindex.xml; fi 
	@if test ! -f entities/missing-entities.ent; then touch entities/missing-entities.ent; fi 
	@if test ! -f entities/missing-ids.xml; then touch entities/missing-ids.xml; fi
	$(NSGMLS) -wno-idref -i lang-$(LANG) -s $(XMLDCL) manual.xml

test_xml: manual.xml
	@if test ! -f funcindex.xml; then touch funcindex.xml; fi 
	@if test ! -f entities/missing-entities.ent; then touch entities/missing-entities.ent; fi 
	@if test ! -f entities/missing-ids.xml; then touch entities/missing-ids.xml; fi
	$(XMLLINT) --noent --noout --valid manual.xml 

test_howto:
	$(XMLLINT) --noent --noout --valid ./howto/howto.xml

# }}}

# {{{ cleanup 

clean:
	rm -rf html php fancy howto/html howto/php htmlhelp/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/file-entities.ent
	rm -f entities/missing*
	rm -f @LANGDIR@/missing-ids.xml
	
distclean: clean
	for file in `find . -name "*.in"`; do rm `dirname $$file`/`basename $$file .in`; done

# }}}
# {{{ tree utils

pull:
	cvs -z3 up -dP $(LANGDIR)

# }}}