1 # Makefile.am -- Makefile for the m17n library documentation.
2 # -*- coding: euc-jp; -*-
4 # National Institute of Advanced Industrial Science and Technology (AIST)
5 # Registration Number H15PRO112
7 # This file is part of the m17n library documentation, a sub-part of
10 # The m17n library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2, or (at
13 # your option) any later version.
15 # The m17n library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with the m17n library; see the file COPYING. If not, write to
22 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
25 ## Process this file with Automake to create Makefile.in
29 usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
30 man/man1/m17nconfig.1 \
31 man/man3/m17nIntro.3m17n \
32 man/man5/m17nDatabaseFormat.5
34 pkgdatadir = $(datadir)/m17n-lib
36 EXTRA_DIST = usr/html usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
37 man/man1 man/man3 man/man5
39 install-pkgdataDATA: $(pkgdata_DATA)
40 $(mkinstalldirs) $(pkgdatadir)/html
41 $(mkinstalldirs) $(mandir)/man1 $(mandir)/man3 $(mandir)/man5
42 $(INSTALL_DATA) usr/latex/m17n-lib.dvi $(pkgdatadir)/m17n-lib.dvi
43 $(INSTALL_DATA) usr/latex/m17n-lib.ps $(pkgdatadir)/m17n-lib.ps
45 for f in *.html; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
47 for f in *.png; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
49 for f in *.1; do $(INSTALL_DATA) $$f $(mandir)/man1/$$f; done
51 for f in *.3m17n; do $(INSTALL_DATA) $$f $(mandir)/man3/$$f; done
53 for f in *.5; do $(INSTALL_DATA) $$f $(mandir)/man5/$$f; done
56 # The followings are for maintainers only.
60 PROJECT_NAME_EN = "The M17N Library"
61 PROJECT_NAME_JA = "M17N ¿¸À¸ì¥é¥¤¥Ö¥é¥ê"
62 PROJECT_VERSION = @PACKAGE_VERSION@
67 @M17NLIB@/example/mconv.c \
68 @M17NLIB@/example/mview.c \
69 @M17NLIB@/example/mdate.c \
70 @M17NLIB@/example/mdump.c \
71 @M17NLIB@/example/medit.c
77 data/m17n-config.txt ${EXAMPLE}
80 @M17NLIB@/src/m17n-core.h \
81 @M17NLIB@/src/m17n.h \
82 @M17NLIB@/src/m17n-gui.h \
83 @M17NLIB@/src/m17n-X.h \
84 @M17NLIB@/src/m17n-err.h \
91 data/mainpage.txt ${MAN3} data/m17n-config.txt data/example.txt ${MAN5}
93 usr-html html-usr: usr/html/index.html usr/html/parrot.png
94 ja-html html-ja: ja/html/index.html ja/html/parrot.png
95 dev-html html-dev: dev/html/index.html dev/html/parrot.png
97 usr-latex latex-usr: usr/latex/m17n-lib.ps
98 ja-latex latex-ja: ja/latex/m17n-lib.ps
99 dev-latex latex-dev: dev/latex/m17n-lib.ps
101 usr-man man-usr: man/man1/m17n-config.1 man/man3/m17nIntro.3m17n man/man5/m17nDatabaseFormat.5
102 ja-man man-ja: ja/man3/m17nIntro.3m
104 usr: html-usr latex-usr man-usr
106 dev: html-dev latex-dev
108 doxyfile-html: doxyfile
109 sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
110 -e 's|%INPUT%|${SRCALL}|' \
111 -e 's|%GENERATE_HTML%|YES|' \
112 -e 's|%GENERATE_LATEX%|NO|' \
113 -e 's|%GENERATE_MAN%|NO|' \
116 doxyfile-html.usr: doxyfile-html
117 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
118 -e 's/%USR_JA_DEV%/usr/g' \
119 -e 's/%OUTPUT_LANGUAGE%/English/' \
122 doxyfile-html.dev: doxyfile-html
123 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
124 -e 's/%USR_JA_DEV%/dev/g' \
125 -e 's/%OUTPUT_LANGUAGE%/English/' \
128 doxyfile-html.ja: doxyfile-html
129 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_JA}|' \
130 -e 's/%USR_JA_DEV%/ja/g' \
131 -e 's/%OUTPUT_LANGUAGE%/Japanese/' \
134 doxyfile-latex: doxyfile
135 sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
136 -e 's|%INPUT%|${SRCALL}|' \
137 -e 's|%GENERATE_HTML%|NO|' \
138 -e 's|%GENERATE_LATEX%|YES|' \
139 -e 's|%GENERATE_MAN%|NO|' \
142 doxyfile-latex.usr: doxyfile-latex
143 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
144 -e 's/%USR_JA_DEV%/usr/g' \
145 -e 's/%OUTPUT_LANGUAGE%/English/' \
148 doxyfile-latex.dev: doxyfile-latex
149 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
150 -e 's/%USR_JA_DEV%/dev/g' \
151 -e 's/%OUTPUT_LANGUAGE%/English/' \
154 doxyfile-latex.ja: doxyfile-latex
155 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_JA}|' \
156 -e 's/%USR_JA_DEV%/ja/g' \
157 -e 's/%OUTPUT_LANGUAGE%/Japanese/' \
160 doxyfile-man1: doxyfile
161 sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
162 -e 's|%INPUT%|${MAN1}|' \
163 -e 's|%GENERATE_HTML%|NO|' \
164 -e 's|%GENERATE_LATEX%|NO|' \
165 -e 's|%GENERATE_MAN%|YES|' \
166 -e 's|%MAN_EXTENSION%|.1|' \
169 doxyfile-man3: doxyfile
170 sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
171 -e 's|%INPUT%|${MAN3}|' \
172 -e 's|%GENERATE_HTML%|NO|' \
173 -e 's|%GENERATE_LATEX%|NO|' \
174 -e 's|%GENERATE_MAN%|YES|' \
175 -e 's|%MAN_EXTENSION%|.3m17n|' \
178 doxyfile-man5: doxyfile
179 sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
180 -e 's|%INPUT%|${MAN5}|' \
181 -e 's|%GENERATE_HTML%|NO|' \
182 -e 's|%GENERATE_LATEX%|NO|' \
183 -e 's|%GENERATE_MAN%|YES|' \
184 -e 's|%MAN_EXTENSION%|.5|' \
187 doxyfile-man%.usr: doxyfile-man%
188 sed -e 's|%PROJECT_NAME%|${PROJECT_NAME_EN}|' \
189 -e 's/%USR_JA_DEV%/usr/g' \
190 -e 's/%OUTPUT_LANGUAGE%/English/' \
193 data/mainpage.txt: data-usr/mainpage.txt
198 data/example.txt: ${MAN1} utils/example.sh
199 cat ${EXAMPLE} | utils/example.sh > $@
201 data/m17n-config.txt: @M17NLIB@/m17n-config.in
202 sed -n -e '/\/\*\*\*/,/\*\// p' < $< > $@
204 %/html/index.html: doxyfile-html.% ${SRCALL} \
205 header.html footer.html \
206 utils/%_filter.rb m17n-lib.css
210 %/html/parrot.png: parrot.png
213 %/latex/refman.tex: doxyfile-latex.% ${SRCALL} utils/%_filter.rb
217 %/latex/m17n-lib.tex: %/latex/refman.tex utils/refman-filter.sed
218 sed -f utils/refman-filter.sed < $< > $@
220 %/latex/m17n-lib.dvi: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh
221 utils/latex.sh `dirname $@` latex
223 %/latex/m17n-lib.ps: %/latex/m17n-lib.dvi utils/dvips.sh
224 utils/dvips.sh `dirname $@` dvips
225 # emacs -batch -q -l utils/mokuji.el -f write-mokuji $@
227 %/latex/m17n-lib.pdf: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh
228 utils/latex.sh `dirname $@` pdflatex
230 %/man/man1/m17n-config.1: doxyfile-man1.% ${MAN1} utils/%_filter.rb
234 %/man/man3/m17nIntro.3m17n: doxyfile-man3.% ${MAN3} utils/%_filter.rb
238 %/man/man5/m17nDatabaseFormat.5: doxyfile-man5.% ${MAN5} utils/%_filter.rb
242 sample/man3/SampleGroup.3: sample.c
243 [ -d sample ] || mkdir sample
244 [ -d sample/man3 ] || mkdir sample/man3
245 -${DOXYGEN} -g doxytemp
246 echo "INPUT = sample.c" >> doxytemp
247 echo "GENERATE_LATEX = NO" >> doxytemp
248 echo "GENERATE_HTML = NO" >> doxytemp
249 echo "GENERATE_MAN = YES" >> doxytemp
250 echo "MAN_OUTPUT = sample" >> doxytemp
251 echo "OPTIMIZE_OUTPUT_FOR_C = yes" >> doxytemp
255 man/man1/%: usr/man/man1/% sample/man3/SampleGroup.3 utils/mkman.rb
256 $(mkinstalldirs) man/man1
257 rm -rf doxywork man/man1/*
258 ruby utils/mkman.rb 1 usr/man/man1 man/man1
260 man/man3/%: usr/man/man3/% sample/man3/SampleGroup.3 utils/mkman.rb
261 $(mkinstalldirs) man/man3
262 rm -rf doxywork usr/man3/*
263 ruby utils/mkman.rb 3m17n usr/man/man3 man/man3
265 man/man5/%: usr/man/man5/% sample/man3/SampleGroup.3 utils/mkman.rb
266 $(mkinstalldirs) man/man5
267 rm -rf doxywork usr/man5/*
268 ruby utils/mkman.rb 5 usr/man/man5 man/man5
270 ja/man3m/%.3m: ja/man/man3/%.3m sample-ja.c utils/mkman.rb
271 -${DOXYGEN} -g doxytemp
272 echo "INPUT = sample.c" >> doxytemp
273 echo "GENERATE_LATEX = NO" >> doxytemp
274 echo "GENERATE_HTML = NO" >> doxytemp
275 echo "GENERATE_MAN = YES" >> doxytemp
276 echo "MAN_OUTPUT = sample" >> doxytemp
277 echo "OPTIMIZE_OUTPUT_FOR_C = yes" >> doxytemp
279 [ -d "ja/man3m" ] || mkdir -p ja/man3m
280 rm -rf ja/man3m/index.*
281 ruby utils/mkman.rb ja
282 rm -rf doxytemp sample
284 CLEANFILES=doxyfile-* *.tar.gz warning *~
287 rm -rf usr dev ja doxywork
289 WEBDIR = /project/web/extra/m17n-lib/m17n-docs
292 [ -d ${WEBDIR} ] || mkdir ${WEBDIR}
293 [ -f ${distdir}.tar.gz ] || make dist
294 cp ${distdir}.tar.gz ${WEBDIR}
295 cp usr/html/* ${WEBDIR}
297 .PRECIOUS: %/latex/m17n-lib.tex %/man/man3/m17nIntro.3m ${SRCALL}