[e2313b]: help / Makefile.am Maximize Restore History

Download this file

Makefile.am    208 lines (175 with data), 5.7 kB

  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
## Process this file with automake to produce Makefile.in
CSS_FILES = \
stylesheets/gimp-help-plain.css \
stylesheets/gimp-help-screen.css
XSL_FILES = \
stylesheets/plainprint.xsl.in \
stylesheets/profile.xsl.in
XML_FILES = \
xml/panotools.xml
MAKEINDEX = \
stylesheets/makeindex.xsl
HELP_STAMPS = \
clean.stamp \
css.stamp \
html.stamp \
images.stamp \
index.stamp \
mkdirs.stamp \
profile.stamp
FORMATS = html pdf
EXTRA_DIST = \
README \
stylesheets/plainhtml.xsl.in \
$(MAKEINDEX) \
images \
$(XML_FILES) \
$(CSS_FILES) \
$(XSL_FILES)
clean.stamp:
@echo '*** Removing the built help files ***'
@for format in $(FORMATS); do \
rm -rf $$format; \
done;
echo '*** Removing temporary files ***'
for lang in en $(ALL_LINGUAS); do \
rm -rf $(top_builddir)/help/xml/$$lang.xml; \
done;
rm -rf `find . -name "*~"`
rm -rf `find . -name "*.orig"`
rm -rf `find . -name "*.bak"`
rm -rf `find . -name "*.rej"`
touch clean.stamp
mkdirs.stamp:
@echo '*** Creating directories ***'
@for format in $(FORMATS); do \
for lang in en $(ALL_LINGUAS); do \
$(mkinstalldirs) $$format/$$lang; \
done; \
done && \
$(mkinstalldirs) xml && \
touch mkdirs.stamp
css.stamp: mkdirs.stamp $(CSS_FILES)
@echo '*** Copying stylesheets ***'
@for lang in en $(ALL_LINGUAS); do \
for css in $(CSS_FILES); do \
cp $(srcdir)/$$css $(top_builddir)/help/html/$$lang; \
done; \
done && \
touch css.stamp
images.stamp: mkdirs.stamp
@echo '*** Copying images ***'
@for format in $(FORMATS); do \
$(mkinstalldirs) $$format/images; \
cp $(srcdir)/images/*.png $$format/images; \
for lang in en $(ALL_LINGUAS); do \
if test -d $(srcdir)/images/$$lang; then \
$(mkinstalldirs) $$format/images/$$lang && \
cp $(srcdir)/images/$$lang/*.png $$format/images/$$lang; \
fi \
done; \
done && \
touch images.stamp
convert.stamp: mkdirs.stamp images.stamp
@echo '*** Converting Images to 8bit depth ***'
cd $(srcdir)/html/images/; \
for i in `find ./ -name '*.png' -type f`; do \
echo "Converting" $$i && \
$(CONVERT) $$i $$i; \
done && \
touch convert.stamp
profile.stamp: mkdirs.stamp $(XML_FILES)
@echo '*** Profiling XML files ***'
for lang in en $(ALL_LINGUAS); do \
echo '-- Profiling XML for '$$lang && \
$(XSLTPROC) $(XSLTFLAGS) --xinclude \
--stringparam profile.lang $$lang \
$(srcdir)/stylesheets/profile.xsl \
$(srcdir)/xml/panotools.xml | \
sed -e "s/xmlns[:a-z]*\=\"[^\"]*\" //" | \
sed -e "s/lang=[\"'][A-Za-z_;]*[\"']/lang=\"$$lang\"/" \
> $(top_builddir)/help/xml/$$lang.xml; \
done && \
touch profile.stamp
html.stamp: profile.stamp $(XML_FILES)
@echo '*** Building HTML ***'
@for lang in en $(ALL_LINGUAS); do \
echo '-- Building HTML for '$$lang && \
$(XSLTPROC) -o $(top_builddir)/help/html/$$lang/ $(XSLTFLAGS) \
--stringparam l10n.gentext.default.language $$lang \
--stringparam profile.lang $$lang \
$(top_builddir)/help/stylesheets/plainhtml.xsl $(top_builddir)/help/xml/$$lang.xml; \
done && \
touch html.stamp
index.stamp: html.stamp
@echo '*** Generating index files ***';
@for lang in en $(ALL_LINGUAS); do \
echo '-- Generating index for '$$lang && \
$(XSLTPROC) $(XSLTFLAGS) \
$(srcdir)/$(MAKEINDEX) \
$(top_builddir)/help/html/$$lang/gimp-xrefs.xml \
> $(top_builddir)/help/html/$$lang/gimp-help.xml ; \
sed -e 's/<gimp-help>/<gimp-help xmlns:panoplugin="http:\/\/panotools.sourceforge.net\/panoplugin\/help">/g' \
-e 's/help-item id=/help-item panoplugin:id=/g' \
$(top_builddir)/help/html/$$lang/gimp-help.xml \
> $(top_builddir)/help/html/$$lang/gimp-help.xml.tmp ; \
mv $(top_builddir)/help/html/$$lang/gimp-help.xml.tmp $(top_builddir)/help/html/$$lang/gimp-help.xml ; \
done && \
touch index.stamp
if GIMP_HELP_BUILD
dist-check-build:
all-local: clean.stamp css.stamp images.stamp index.stamp
CLEANFILES = $(HELP_STAMPS)
install-data-local:
$(mkinstalldirs) $(DATADIR)/help
@for lang in en $(ALL_LINGUAS); do \
echo '-- Installing HTML for '$$lang && \
$(mkinstalldirs) $(DATADIR)/help/$$lang; \
cp -r $(top_builddir)/help/html/$$lang/*.html $(DATADIR)/help/$$lang; \
cp -r $(top_builddir)/help/html/$$lang/*.css $(DATADIR)/help/$$lang; \
cp -r $(top_builddir)/help/html/$$lang/gimp-help.xml $(DATADIR)/help/$$lang; \
done;
else
dist-check-build:
@echo "*** --enable-build must be specified in order to make dist"
@false
all-local: css.stamp images.stamp
install-data-local:
$(mkinstalldirs) $(DATADIR)/help
@for lang in en $(ALL_LINGUAS); do \
echo '-- Installing HTML for '$$lang && \
$(mkinstalldirs) $(DATADIR)/help/$$lang; \
cp -r $(srcdir)/html/$$lang/*.html $(DATADIR)/help/$$lang; \
cp -r $(srcdir)/html/$$lang/*.css $(DATADIR)/help/$$lang; \
cp -r $(srcdir)/html/$$lang/gimp-help.xml $(DATADIR)/help/$$lang; \
done;
endif
MAINTAINERCLEANFILES = \
$(HELP_STAMPS) \
Makefile.in
CONFIG_CLEAN_FILES = $(HELP_STAMPS)
maintainer-clean-local:
rm -rf html pdf
distclean-local:
for lang in en $(ALL_LINGUAS); do \
rm -f html/$$lang/*.css; \
done;
rm -rf html/images
rm -rf pdf/images
clean-local:
for lang in en $(ALL_LINGUAS); do \
rm -f xml/$$lang.xml; \
done;
## Do not copy the complete html directory to distdir.
## The images don't need to be in the tarball twice, they are copied
## by the images.stamp rule.
dist-hook:
$(mkinstalldirs) $(distdir)/html
for lang in en $(ALL_LINGUAS); do \
cp -r html/$$lang $(distdir)/html; \
done
rm -rf `find $(distdir)/images -name CVS`
rm -rf `find $(distdir)/images -name .cvsignore`
## Cleanup properly
uninstall-hook:
rm -rf $(DATADIR)