*** empty log message ***
[m17n/m17n-docs.git] / Makefile.am
index 7f9a6fe..d7d8665 100644 (file)
@@ -1,5 +1,4 @@
 # Makefile.am -- Makefile for the m17n library documentation.
-#                                               -*- coding: euc-jp; -*-
 # Copyright (C) 2003
 #   National Institute of Advanced Industrial Science and Technology (AIST)
 #   Registration Number H15PRO112
@@ -29,7 +28,7 @@ pkgdata_DATA = \
        usr/latex/m17n-lib.dvi usr/latex/m17n-lib.ps \
        man/man1/m17nconfig.1 \
        man/man3/m17nIntro.3m17n \
-       man/man5/m17nDatabaseFormat.5
+       man/man5/mdbGeneral.5
 
 pkgdatadir = $(datadir)/m17n-lib
 
@@ -42,9 +41,9 @@ install-pkgdataDATA: $(pkgdata_DATA)
        $(INSTALL_DATA) usr/latex/m17n-lib.dvi $(pkgdatadir)/m17n-lib.dvi
        $(INSTALL_DATA) usr/latex/m17n-lib.ps $(pkgdatadir)/m17n-lib.ps
        cd usr/html; \
-         for f in *.html; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
-       cd usr/html; \
-         for f in *.png; do $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; done
+         for f in *.html *.png; do \
+           $(INSTALL_DATA) $$f $(pkgdatadir)/html/$$f; \
+         done
        cd man/man1; \
          for f in *.1; do $(INSTALL_DATA) $$f $(mandir)/man1/$$f; done
        cd man/man3; \
@@ -58,12 +57,12 @@ install-pkgdataDATA: $(pkgdata_DATA)
 if MAINTAINER_MODE
 
 PROJECT_NAME_EN = "The M17N Library"
-PROJECT_NAME_JA = "M17N Â¿¸À¸ì¥é¥¤¥Ö¥é¥ê"
+PROJECT_NAME_JA = "M17N ¥é¥¤¥Ö¥é¥ê"
 PROJECT_VERSION = @PACKAGE_VERSION@
 
 DOXYGEN = doxygen
 
-EXAMPLE = \
+EXAMPLE_PROGS = \
        @M17NLIB@/example/mconv.c \
        @M17NLIB@/example/mview.c \
        @M17NLIB@/example/mdate.c \
@@ -72,10 +71,14 @@ EXAMPLE = \
        @M17NLIB@/example/mimx-anthy.c \
        @M17NLIB@/example/mimx-ispell.c
 
+EXAMPLE_MIMS = \
+       @M17NLIB@/example/anthy.mim \
+       @M17NLIB@/example/ispell.mim
+
 DBFORMAT = \
        @M17NDB@/FORMATS
 
-MAN1 = data/m17n-config.txt ${EXAMPLE}
+MAN1 = data/m17n-config.txt ${EXAMPLE_PROGS}
 
 MAN3 = @M17NLIB@/src/m17n-core.h \
        @M17NLIB@/src/m17n.h \
@@ -89,7 +92,10 @@ MAN5 = ${DBFORMAT}
 SRCALL = \
        mainpage.txt \
        ${MAN3} \
-       data/m17n-config.txt data/example.txt data/dbformat.txt
+       data/m17n-config.txt data/exprog.txt data/exmim.txt data/dbformat.txt \
+       data/dbdata.txt
+
+DBDATA = $(shell echo @M17NDB@/*.mim @M17NDB@/*.flt)
 
 HTML_USR_TARGET = usr/html/index.html usr/html/parrot.png
 HTML_JA_TARGET = ja/html/index.html ja/html/parrot.png
@@ -110,7 +116,7 @@ ja-latex latex-ja: ${LATEX_JA_TARGET}
 dev-latex latex-dev: ${LATEX_DEV_TARGET}
 
 MAN_USR_TARGET = man/man1/m17n-config.1 man/man3/m17nIntro.3m17n man/man5/m17nDBgeneral.5
-MAN_JA_TARGET = man/ja//man1/m17n-config.1 man/ja//man3/m17nIntro.3m17n man/ja/man5/m17nDatabaseFormat.5
+MAN_JA_TARGET = man/ja/man1/m17n-config.1 man/ja/man3/m17nIntro.3m17n man/ja/man5/m17nDatabaseFormat.5
 MAN_TARGET = ${MAN_USR_TARGET} ${MAN_JA_TARGET}
 
 usr-man man-usr: ${MAN_USR_TARGET}
@@ -122,7 +128,11 @@ usr: usr-html usr-latex usr-man
 ja: ja-html ja-latex ja-man
 dev: dev-html dev-latex
 
-doxyfile-html: doxyfile
+html: usr-html ja-html dev-html
+latex: usr-latex ja-latex dev-latex
+man: usr-man ja-man
+
+doxyfile-html: doxyfile Makefile
        sed -e 's|%PROJECT_NUMBER%|@PACKAGE_VERSION@|' \
            -e 's|%INPUT%|${SRCALL}|' \
            -e 's|%GENERATE_HTML%|YES|' \
@@ -207,8 +217,14 @@ doxyfile-man%.usr: doxyfile-man%
            -e 's/%OUTPUT_LANGUAGE%/English/' \
          < $< >$@
 
-data/example.txt: ${EXAMPLE} utils/example.sh
-       utils/example.sh ${EXAMPLE} > $@
+data/exprog.txt: ${EXAMPLE_PROGS} utils/exprog.sh
+       utils/exprog.sh ${EXAMPLE_PROGS} > $@
+
+data/exmim.txt: ${EXAMPLE_MIMS} utils/exmim.sh
+       utils/exmim.sh ${EXAMPLE_MIMS} > $@
+
+data/dbdata.txt: ${DBDATA} utils/dbdata.sh
+       utils/dbdata.sh @M17NDB@ > $@
 
 data/dbformat.txt: ${DBFORMAT} utils/dbformat.sh
        utils/dbformat.sh ${DBFORMAT}/*.txt > $@
@@ -216,11 +232,11 @@ data/dbformat.txt: ${DBFORMAT} utils/dbformat.sh
 data/m17n-config.txt: @M17NLIB@/m17n-config.in
        sed -n -e '/\/\*\*\*/,/\*\// p' < $< > $@
 
-%/html/index.html: doxyfile-html.% ${SRCALL} \
-                       header.html footer.html \
+%/html/index.html: doxyfile-html.% header.%.html footer.%.html ${SRCALL} \
                        utils/%_filter.rb m17n-lib.css
-       rm -rf `dirname $@`
+       rm -f `dirname $@`/*.html
        ${DOXYGEN} $<
+       echo 'code { font-weight: bold }' >> `dirname $@`/doxygen.css
 
 %/html/parrot.png: parrot.png
        cp $< $@
@@ -229,10 +245,7 @@ data/m17n-config.txt: @M17NLIB@/m17n-config.in
        rm -rf `dirname $@`
        ${DOXYGEN} $<
 
-%/latex/m17n-lib.tex: %/latex/refman.tex utils/refman-filter.sed
-       sed -f utils/refman-filter.sed < $< > $@
-
-%/latex/m17n-lib.dvi: %/latex/m17n-lib.tex data-%/m17n-lib.sty utils/latex.sh
+%/latex/m17n-lib.dvi: %/latex/refman.tex data-%/m17n-lib.sty utils/latex.sh
        utils/latex.sh `dirname $@` latex
 
 %/latex/m17n-lib.ps: %/latex/m17n-lib.dvi utils/dvips.sh
@@ -274,27 +287,28 @@ man/man1/%: usr/man/man1/% sample/man3/SampleGroup.3 utils/mkman.rb
 
 man/man3/%: usr/man/man3/% sample/man3/SampleGroup.3 utils/mkman.rb 
        $(mkinstalldirs) man/man3
-       rm -rf doxywork usr/man3/*
+       rm -rf doxywork man/man3/*
        ruby utils/mkman.rb 3m17n usr/man/man3 man/man3
 
 man/man5/%: usr/man/man5/% sample/man3/SampleGroup.3 utils/mkman.rb 
        $(mkinstalldirs) man/man5
-       rm -rf doxywork usr/man5/*
+       rm -rf doxywork man/man5/*
        ruby utils/mkman.rb 5 usr/man/man5 man/man5
 
-ja/man3m/%.3m: ja/man/man3/%.3m sample-ja.c utils/mkman.rb 
-       -${DOXYGEN} -g doxytemp
-       echo "INPUT = sample.c" >> doxytemp
-       echo "GENERATE_LATEX = NO" >> doxytemp
-       echo "GENERATE_HTML = NO" >> doxytemp
-       echo "GENERATE_MAN = YES" >> doxytemp
-       echo "MAN_OUTPUT = sample" >> doxytemp
-       echo "OPTIMIZE_OUTPUT_FOR_C  = yes" >> doxytemp
-       ${DOXYGEN} doxytemp
-       [ -d "ja/man3m" ] || mkdir -p ja/man3m
-       rm -rf ja/man3m/index.*
-       ruby utils/mkman.rb ja
-       rm -rf doxytemp sample
+man/ja/man1/%: ja/man/man1/% sample/man3/SampleGroup.3 utils/mkman.rb 
+       $(mkinstalldirs) man/ja/man1
+       rm -rf doxywork man/ja/man1/*
+       ruby utils/mkman.rb 1 ja/man/man1 man/ja/man1
+
+man/ja/man3/%: ja/man/man3/% sample/man3/SampleGroup.3 utils/mkman.rb 
+       $(mkinstalldirs) man/ja/man3
+       rm -rf doxywork man/ja/man3/*
+       ruby utils/mkman.rb 3m17n ja/man/man3 man/ja/man3
+
+man/ja/man5/%: ja/man/man5/% sample/man3/SampleGroup.3 utils/mkman.rb 
+       $(mkinstalldirs) man/ja/man5
+       rm -rf doxywork man/ja/man5/*
+       ruby utils/mkman.rb 5 ja/man/man5 man/ja/man5
 
 CLEANFILES=doxyfile-* ${TARGET} *.tar.gz warning *~
 
@@ -302,13 +316,18 @@ clean-local:
        rm -rf usr dev ja man doxywork
 
 WEBDIR = /project/web/extra/m17n-lib/m17n-docs
+FTPDIR = /ftp/pub/m17n-lib
 
-web: usr-html
+release: dist
        [ -d ${WEBDIR} ] || mkdir ${WEBDIR}
-       [ -f ${distdir}.tar.gz ] || make dist
-       cp ${distdir}.tar.gz ${WEBDIR}
        cp usr/html/* ${WEBDIR}
+       cp ${distdir}.tar.gz ${FTPDIR}
 
-.PRECIOUS: %/latex/m17n-lib.tex %/man/man3/m17nIntro.3m ${SRCALL}
+
+.PRECIOUS: %/latex/refman.tex %/man/man3/m17nIntro.3m ${SRCALL}
 
 endif
+
+# Local Variables:
+# coding: euc-jp
+# End: