chiark / gitweb /
Merge doc/ and Documentation/ directories.
authorYann Dirson <ydirson@altern.org>
Wed, 28 Feb 2007 08:41:55 +0000 (08:41 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 28 Feb 2007 08:41:55 +0000 (08:41 +0000)
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>
Documentation/.gitignore [new file with mode: 0644]
Documentation/Makefile
Documentation/tutorial.conf [moved from doc/asciidoc.conf with 100% similarity]
Documentation/tutorial.txt [moved from doc/tutorial.txt with 100% similarity]
Makefile
doc/.gitignore [deleted file]
doc/Makefile [deleted file]

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
new file mode 100644 (file)
index 0000000..6da6dc4
--- /dev/null
@@ -0,0 +1,5 @@
+*.html
+*.pdf
+*.7
+*.1
+doc.dep
index 7f5520c760878379f7c44a6abf8f6fd3db681f96..ea387e76fbde9c85145946938d30c56605a91c93 100644 (file)
@@ -3,6 +3,13 @@ MAN7_TXT=stg.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))
 
@@ -28,6 +35,7 @@ INSTALL?=install
 all: html man
 
 html: $(DOC_HTML)
+pdf: $(DOC_PDF)
 
 $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
 
@@ -50,7 +58,7 @@ doc.dep : $(wildcard *.txt) build-docdep.perl
 -include doc.dep
 
 clean:
-       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) $<
@@ -60,3 +68,12 @@ clean:
 
 %.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 $<
similarity index 100%
rename from doc/tutorial.txt
rename to Documentation/tutorial.txt
index df77d9731880c02b20cd6400444e06a61364dfdf..8cd5813ae77033eb4af604be22ab56bfcd06bf08 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,15 +9,17 @@ install:
        $(PYTHON) setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
 
 doc:
-       cd doc && $(MAKE) all
+       cd Documentation && $(MAKE) all
 
 test:
        cd t && $(MAKE) all
 
 clean:
-       for dir in doc t; do \
+       for dir in Documentation t; do \
                (cd $$dir && $(MAKE) clean); \
        done
        rm -rf build
        rm -f stgit/*.pyc
        rm -f stgit/commands/*.pyc
+
+.PHONY: all install doc test clean
diff --git a/doc/.gitignore b/doc/.gitignore
deleted file mode 100644 (file)
index 15ba6af..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-tutorial.html
-tutorial.pdf
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644 (file)
index 07704b8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-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