From 368a44c3761d46b5a085215a9ed6878da4e84fa6 Mon Sep 17 00:00:00 2001 Message-Id: <368a44c3761d46b5a085215a9ed6878da4e84fa6.1746657657.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 28 Feb 2007 08:41:55 +0000 Subject: [PATCH] Merge doc/ and Documentation/ directories. Organization: Straylight/Edgeware From: Yann Dirson 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 --- Documentation/.gitignore | 5 +++++ Documentation/Makefile | 19 ++++++++++++++++++- .../tutorial.conf | 0 {doc => Documentation}/tutorial.txt | 0 Makefile | 6 ++++-- doc/.gitignore | 2 -- doc/Makefile | 17 ----------------- 7 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 Documentation/.gitignore rename doc/asciidoc.conf => Documentation/tutorial.conf (100%) rename {doc => Documentation}/tutorial.txt (100%) delete mode 100644 doc/.gitignore delete mode 100644 doc/Makefile diff --git a/Documentation/.gitignore b/Documentation/.gitignore new file mode 100644 index 0000000..6da6dc4 --- /dev/null +++ b/Documentation/.gitignore @@ -0,0 +1,5 @@ +*.html +*.pdf +*.7 +*.1 +doc.dep diff --git a/Documentation/Makefile b/Documentation/Makefile index 7f5520c..ea387e7 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -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 $< diff --git a/doc/asciidoc.conf b/Documentation/tutorial.conf similarity index 100% rename from doc/asciidoc.conf rename to Documentation/tutorial.conf diff --git a/doc/tutorial.txt b/Documentation/tutorial.txt similarity index 100% rename from doc/tutorial.txt rename to Documentation/tutorial.txt diff --git a/Makefile b/Makefile index df77d97..8cd5813 100644 --- 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 index 15ba6af..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tutorial.html -tutorial.pdf diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 07704b8..0000000 --- a/doc/Makefile +++ /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 -- [mdw]