| 1 | NAME=Vine-manual |
|---|
| 2 | VERSION=`date +'%Y%m%d'` |
|---|
| 3 | WEB_SRC=cui-guide desktop-guide making-rpm getinfo license cr-support VinePlus emacs-guide |
|---|
| 4 | SOURCES=index ${WEB_SRC} |
|---|
| 5 | |
|---|
| 6 | WEB_XMLS=$(addsuffix .xml, $(WEB_SRC)) |
|---|
| 7 | XMLS=$(addsuffix .xml, $(SOURCES)) |
|---|
| 8 | OTXTS=$(addsuffix .txt, $(SOURCES)) |
|---|
| 9 | TXTS=$(addsuffix .euc, $(SOURCES)) $(addsuffix .sjis, $(SOURCES)) |
|---|
| 10 | HTMLS=$(addsuffix .html, $(SOURCES)) |
|---|
| 11 | OHTMLS=$(addsuffix *.html, $(SOURCES)) |
|---|
| 12 | TEXS=$(addsuffix .tex, $(SOURCES)) |
|---|
| 13 | DVIS=$(addsuffix .dvi, $(SOURCES)) |
|---|
| 14 | PSS=$(addsuffix .ps, $(SOURCES)) |
|---|
| 15 | |
|---|
| 16 | DESTDIR= |
|---|
| 17 | DOCDIR=/usr/share/doc/Vine |
|---|
| 18 | WEBDIR=/home/httpd/html/manuals |
|---|
| 19 | GETHTML=../bin/gethtml.pl |
|---|
| 20 | HTMLLIST=htmllist |
|---|
| 21 | |
|---|
| 22 | .SUFFIXES: .txt .html .euc .sjis .tex .dvi .ps .xml |
|---|
| 23 | |
|---|
| 24 | .xml.txt: |
|---|
| 25 | xsltproc /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl $< | w3m -T text/html -dump > $@ |
|---|
| 26 | |
|---|
| 27 | .xml.html: |
|---|
| 28 | #xsltproc -stringparam chunker.output.encoding euc-jp -stringparam chunker.output.indent yes custom.xsl $< |
|---|
| 29 | xsltproc -stringparam chunker.output.indent yes custom.xsl $< |
|---|
| 30 | |
|---|
| 31 | .txt.euc: |
|---|
| 32 | nkf -e $< > $@ |
|---|
| 33 | |
|---|
| 34 | .txt.sjis: |
|---|
| 35 | nkf -cs $< > $@ |
|---|
| 36 | |
|---|
| 37 | .sgml.tex: |
|---|
| 38 | sgml2latex $< |
|---|
| 39 | |
|---|
| 40 | %.dvi: %.tex |
|---|
| 41 | |
|---|
| 42 | .tex.dvi: |
|---|
| 43 | jlatex $< |
|---|
| 44 | jlatex $< |
|---|
| 45 | jlatex $< |
|---|
| 46 | rm -f $(basename $<).{aux,log,toc} |
|---|
| 47 | |
|---|
| 48 | .dvi.ps: |
|---|
| 49 | dvips $< |
|---|
| 50 | |
|---|
| 51 | all: update-watch |
|---|
| 52 | for f in ${WEB_XMLS}; do \ |
|---|
| 53 | xsltproc -stringparam chunker.output.encoding iso-2022-jp -stringparam chunker.output.indent yes web.xsl $$f; \ |
|---|
| 54 | done |
|---|
| 55 | |
|---|
| 56 | online: update-watch txt html |
|---|
| 57 | |
|---|
| 58 | txt: $(TXTS) |
|---|
| 59 | |
|---|
| 60 | html: $(HTMLS) |
|---|
| 61 | |
|---|
| 62 | ps: $(PSS) |
|---|
| 63 | |
|---|
| 64 | dvi: $(DVIS) |
|---|
| 65 | |
|---|
| 66 | tex: $(TEXS) |
|---|
| 67 | |
|---|
| 68 | clean: |
|---|
| 69 | rm -f *.{sjis,euc,tex,log,aux,dvi,toc,ps,html} *~ |
|---|
| 70 | rm desktop-guide/update-watch.xml |
|---|
| 71 | |
|---|
| 72 | dist: clean |
|---|
| 73 | cd .. && rm -rf ${NAME}-${VERSION} |
|---|
| 74 | cd .. && cp -arf ${NAME} ${NAME}-${VERSION} |
|---|
| 75 | cd .. && tar cf - --exclude CVS ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2 |
|---|
| 76 | cd .. && rm -rf ${NAME}-${VERSION} |
|---|
| 77 | |
|---|
| 78 | install: all install-web |
|---|
| 79 | |
|---|
| 80 | install-online: online |
|---|
| 81 | install -d ${DESTDIR}${DOCDIR} |
|---|
| 82 | install -d ${DESTDIR}${DOCDIR}/manuals-sjis |
|---|
| 83 | install -d ${DESTDIR}${DOCDIR}/manuals-euc |
|---|
| 84 | install -m 644 *.html ${DESTDIR}${DOCDIR} |
|---|
| 85 | install -m 644 *.css ${DESTDIR}${DOCDIR} |
|---|
| 86 | install -m 644 *.sjis ${DESTDIR}${DOCDIR}/manuals-sjis/ |
|---|
| 87 | install -m 644 *.euc ${DESTDIR}${DOCDIR}/manuals-euc/ |
|---|
| 88 | install -d ${DESTDIR}${DOCDIR}/images |
|---|
| 89 | install -m 644 images/*.png ${DESTDIR}${DOCDIR}/images/ |
|---|
| 90 | #install -d ${DESTDIR}${DOCDIR}/images/callouts/ |
|---|
| 91 | #install -m 644 images/callouts/*.png ${DESTDIR}${DOCDIR}/images/callouts/ |
|---|
| 92 | #install -d ${DESTDIR}${DOCDIR}/stylesheet-images |
|---|
| 93 | #install -m 644 stylesheet-images/*.png ${DESTDIR}${DOCDIR}/manuals/stylesheet-images/ |
|---|
| 94 | |
|---|
| 95 | install-web: |
|---|
| 96 | [ -d ${DESTDIR}${WEBDIR}/manuals ] || install -d ${DESTDIR}${WEBDIR}/manuals |
|---|
| 97 | for f in `ls *.html`; do \ |
|---|
| 98 | ${GETHTML} -t "" -l ${HTMLLIST} $$f | nkf -j > ${DESTDIR}/${WEBDIR}/manuals/$$f; \ |
|---|
| 99 | done |
|---|
| 100 | install -m 644 web.css ${DESTDIR}${WEBDIR}/manuals/ |
|---|
| 101 | install -d ${DESTDIR}${WEBDIR}/manuals/images |
|---|
| 102 | install -m 644 images/*.png ${DESTDIR}${WEBDIR}/manuals/images/ |
|---|
| 103 | #install -d ${DESTDIR}${WEBDIR}/manuals/images/callouts/ |
|---|
| 104 | #install -m 644 images/callouts/*.png ${DESTDIR}${WEBDIR}/manuals/images/callouts/ |
|---|
| 105 | #install -d ${DESTDIR}${WEBDIR}/manuals/stylesheet-images |
|---|
| 106 | #install -m 644 stylesheet-images/*.gif ${DESTDIR}${WEBDIR}/manuals/stylesheet-images/ |
|---|
| 107 | |
|---|
| 108 | update-watch: |
|---|
| 109 | sh update-watch.sh |
|---|