ドキュメント更新
[YACASL2.git] / doc / Makefile
index c9a2cb8..98b03fc 100644 (file)
@@ -1,23 +1,28 @@
 DOCNAME = yacasl2
 SRC = $(DOCNAME).texi
+CSS = style.css
 TEXBIN = /usr/local/teTeX/bin
 PTEX = $(TEXBIN)/ptex
 TEXINDEX = $(TEXBIN)/texindex
 DVI2PDF = $(TEXBIN)/dvipdfmx
 TEXOBJDIR = texobj
 
-.PHONY: html pdf clean
-$(DOCNAME).html: $(SRC)
-       @makeinfo -o $@ --no-split --no-headers --html --css-include=style.css $^
-html: $(SRC)
-       @cp style.css $@/; \
-         makeinfo -o $@ --html --css-ref=style.css $^
+.PHONY: all htmlnosplit pdf clean
+all: htmlnosplit html pdf
+htmlnosplit: $(DOCNAME).html
+$(DOCNAME).html: $(SRC) $(CSS)
+       @makeinfo -o $@ --no-split --no-headers --html --css-include=$(CSS) $(SRC)
+html: $(SRC) $(CSS)
+       @if test ! -s $@; then mkdir $@; fi; \
+     cp $(CSS) $@/$(CSS); \
+     makeinfo -o $@ --html --css-ref=style.css $(SRC)
+pdf: $(DOCNAME).pdf
+$(DOCNAME).pdf: $(DOCNAME).dvi
+       @$(DVI2PDF) $^
 $(DOCNAME).dvi: $(SRC)
        @if test ! -s $(TEXOBJDIR); then mkdir $(TEXOBJDIR); fi; \
      cd $(TEXOBJDIR); \
      TEX=ptex texi2dvi --texinfo=@afourpaper -o ../$@ ../$^; \
      cd -
-$(DOCNAME).pdf: $(DOCNAME).dvi
-       @$(DVI2PDF) $^
 clean:
        @rm -rf html $(TEXOBJDIR) $(DOCNAME).html $(DOCNAME).dvi $(DOCNAME).pdf