This merges everything into Documentation, to match the GIT layout
("make doc" did not work anyway since "doc" was not marked phony).
Signed-off-by: Yann Dirson <ydirson@altern.org>
--- /dev/null
+*.html
+*.pdf
+*.7
+*.1
+doc.dep
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
+ARTICLES =
+# with their own formatting rules.
+SP_ARTICLES = tutorial
+
+DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
+DOC_PDF += $(patsubst %,%.pdf,$(ARTICLES) $(SP_ARTICLES))
+
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
all: html man
html: $(DOC_HTML)
all: html man
html: $(DOC_HTML)
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
- rm -f *.xml *.html *.1 *.7 doc.dep
+ rm -f *.xml *.html *.pdf *.1 *.7 doc.dep
%.html : %.txt
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
%.html : %.txt
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
%.xml : %.txt
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
%.xml : %.txt
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
+
+%.pdf: %.xml
+ xmlto pdf $<
+
+# special formatting rules
+tutorial.html : %.html : %.txt
+ $(ASCIIDOC) -b xhtml11 -d article -f tutorial.conf $(ASCIIDOC_EXTRA) $<
+tutorial.xml : %.xml : %.txt
+ $(ASCIIDOC) -b docbook -d article -f tutorial.conf $<
$(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
doc:
$(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
doc:
+ cd Documentation && $(MAKE) all
test:
cd t && $(MAKE) all
clean:
test:
cd t && $(MAKE) all
clean:
+ for dir in Documentation t; do \
(cd $$dir && $(MAKE) clean); \
done
rm -rf build
rm -f stgit/*.pyc
rm -f stgit/commands/*.pyc
(cd $$dir && $(MAKE) clean); \
done
rm -rf build
rm -f stgit/*.pyc
rm -f stgit/commands/*.pyc
+
+.PHONY: all install doc test clean
+++ /dev/null
-tutorial.html
-tutorial.pdf
+++ /dev/null
-DOCS = tutorial.txt
-DOCS_HTML = $(DOCS:.txt=.html)
-DOCS_PDF = $(DOCS:.txt=.pdf)
-
-all: $(DOCS_HTML) $(DOCS_PDF)
-
-%.html: %.txt
- asciidoc $<
-
-%.xml: %.txt
- asciidoc --backend=docbook $<
-
-%.pdf: %.xml
- xmlto pdf $<
-
-clean:
- rm -f *.xml *.html *.pdf