forked from php/doc-gtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
170 lines (144 loc) · 5.4 KB
/
Makefile.in
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
# +----------------------------------------------------------------------+
# | PHP Version 5.1 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1999-2006 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.0.1 of the PHP license, |
# | that is bundled with this package in the file LICENSE and is |
# | available online at http://www.php.net/license/3_0_1.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 |
# | [email protected] so we can mail you a copy immediately |
# +----------------------------------------------------------------------+
# | Authors: James Moore <[email protected]>, Steph Fox <[email protected]> |
# +----------------------------------------------------------------------+
#
# $Id$
#
#
# Paths
#
STYLESHEET_DIR = @STYLESHEET_DIR@
SCRIPT_DIR = @SCRIPT_DIR@
MANUAL = @MANUAL@
LANG = @LANG@
BUILD = build/@LANG@
BUILD_TEST = testbuild
HISTORY = @HISTORY@
QUIET = @QUIET@
#
# Programs and scripts
#
XSLTPROC = @XSLTPROC@
PHP = @PHP@
HIGHLIGHT = $(SCRIPT_DIR)/highlight.php
SPLIT = $(SCRIPT_DIR)/distribute_html.php
IMAGES = $(SCRIPT_DIR)/copy_images.php
TMP = $(BUILD_TEST)/temp.php
TS = @TS@
#
# Default Rule
#
all: html
#
# Build Aliases
#
bigmanual.html: $(BUILD)/bigmanual.html
demo: $(BUILD_TEST)/demo_manual.html
html: $(BUILD)/html/index.html
mtoc: $(BUILD_TEST)/mtoc.xml
phpweb: $(BUILD)/php/index.php
test: $(BUILD_TEST)/$(id).html
phptest: $(BUILD_TEST)/$(id).php
text: $(BUILD)/manual.txt
updates: $(BUILD_TEST)/updates-$(LANG).php
revcheck: revcheck.html
mirror-files: $(BUILD)/bigmanual.html.gz \
$(BUILD)/php_gtk_manual_$(LANG).tar.bz2 \
$(BUILD)/php_gtk_manual_$(LANG).tar.gz \
$(BUILD)/php_gtk_manual_$(LANG).zip \
$(BUILD)/php_gtk_manual_$(LANG).txt.gz
#
# Dependency Aliases
#
html = $(STYLESHEET_DIR)/html.xsl
chunk = $(STYLESHEET_DIR)/chunk.xsl
phpweb = $(STYLESHEET_DIR)/phpweb.xsl
docbook = $(STYLESHEET_DIR)/docbook.xsl
updates = $(STYLESHEET_DIR)/updates.xsl
#
# Make Rules
#
$(BUILD)/manual.txt: bigmanual.html
@mkdir -p $(BUILD)
lynx -nolist -dump file:`pwd`/$(BUILD)/bigmanual.html > $@
$(BUILD)/bigmanual.html: $(SCRIPT_DIR)/manual.xml
@mkdir -p $(BUILD)
$(XSLTPROC) --xinclude $(docbook) $(SCRIPT_DIR)/manual.xml > $(BUILD)/bigmanual.html
$(BUILD)/html/index.html: scripts/manual.xml
@mkdir -p $(BUILD)/html
$(XSLTPROC) --param base.dir "'$(BUILD)/html/'" --xinclude $(chunk) $(SCRIPT_DIR)/manual.xml
$(PHP) $(SPLIT) $(BUILD)/html
$(PHP) $(IMAGES) $(BUILD)/html
$(BUILD)/php/index.php: scripts/manual.xml
@mkdir -p $(BUILD)/php
$(XSLTPROC) --param base.dir "'$(BUILD)/php/'" --xinclude $(phpweb) $(SCRIPT_DIR)/manual.xml
$(PHP) $(HIGHLIGHT) php $(BUILD)/php
$(PHP) $(IMAGES) $(BUILD)/php
$(BUILD)/bigmanual.html.gz: $(BUILD)/bigmanual.html
@mkdir -p $(BUILD)
gzip -c -9 $< > $@
$(BUILD)/php_gtk_manual_$(LANG).tar.bz2: $(BUILD)/html/index.html
(cd $(BUILD); tar -cf - html) | bzip2 -9 > $@
$(BUILD)/php_gtk_manual_$(LANG).tar.gz: $(BUILD)/html/index.html
(cd $(BUILD); tar -c html) | gzip -9 > $@
$(BUILD)/php_gtk_manual_$(LANG).zip: $(BUILD)/html/index.html
(cd $(BUILD); zip -q -r -9 - html) > $@
$(BUILD)/php_gtk_manual_$(LANG).txt.gz: $(BUILD)/manual.txt
@mkdir -p $(BUILD)
gzip -c -9 $< > $@
$(BUILD_TEST)/$(id).html: $(SCRIPT_DIR)/manual.xml
@mkdir -p $(BUILD_TEST)
$(XSLTPROC) --param base.dir "'$(BUILD_TEST)/'" --stringparam rootid "$(id)" --xinclude $(chunk) $(SCRIPT_DIR)/manual.xml
$(BUILD_TEST)/$(id).php: $(SCRIPT_DIR)/manual.xml
@mkdir -p $(BUILD_TEST)
$(XSLTPROC) --param base.dir "'$(BUILD_TEST)/'" --stringparam rootid "$(id)" --xinclude $(phpweb) $(SCRIPT_DIR)/manual.xml
$(BUILD_TEST)/demo_manual.html: $(SCRIPT_DIR)/demo_manual.xml
@mkdir -p $(BUILD_TEST)
$(XSLTPROC) --param base.dir "'$(BUILD_TEST)/'" --xinclude $(chunk) $(SCRIPT_DIR)/demo_manual.xml
$(BUILD_TEST)/mtoc.xml: $(SCRIPT_DIR)/mtoc.xml
@mkdir -p $(BUILD_TEST)
$(XSLTPROC) --param base.dir "'$(BUILD_TEST)/'" --xinclude $(chunk) $(SCRIPT_DIR)/mtoc.xml
$(BUILD_TEST)/updates-$(LANG).php: $(SCRIPT_DIR)/testclasses.xml
@mkdir -p $(BUILD_TEST)
$(XSLTPROC) $(updates) $(SCRIPT_DIR)/testmanual.xml > $(TMP)
@cat $(TMP) | sed -e 's/ \[en\]//;s/\"\"/"$(TS)"/;/php/!d;s/^ *//' > $(BUILD_TEST)/updates-new.php
@if test $(HISTORY) != "no" -a -f $(HISTORY)/updates-$(LANG).php; then \
cp $(HISTORY)/updates-$(LANG).php $@; \
$(PHP) $(SCRIPT_DIR)/merge_updates.php $(BUILD_TEST)/updates-new.php $@; \
else \
mv $(BUILD_TEST)/updates-new.php $@; \
fi
@rm -f $(TMP)
#
# Clean Rules
#
clean:
rm -rf $(BUILD)
rm -rf autom4te.cache
rm -f config.status config.log configure Makefile
rm -f $(MANUAL)/chapters.ent
rm -f $(SCRIPT_DIR)/manual.xml $(SCRIPT_DIR)/genchapterents.php $(SCRIPT_DIR)/update.xsl
distclean: clean
rm -f Makefile $(SCRIPT_DIR)/manual.xml configure
rm -f config.cache config.log config.status version.ent
cd $(SCRIPT_DIR); rm -f genchapterents.php
cd $(STYLESHEET_DIR); rm -f phpweb.xsl
rm -rf $(BUILD_TEST)
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` || true); \
done
FORCE:
revcheck.html: FORCE
$(PHP) -f ./scripts/revcheck.php $(LANG) > revcheck.html