aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/Makefile
diff options
context:
space:
mode:
authorreinelt <>2004-06-02 05:28:06 +0000
committerreinelt <>2004-06-02 05:28:06 +0000
commit2e3c73e0883a2bdfa525fc6fe4e10d30971d9651 (patch)
tree8333b427632f129e005ca6f7d4796c18ffddccb6 /documentation/Makefile
parent91ef53962dfc61a78b58a5fcd7ca2e3941a1be1b (diff)
downloadlcd4linux-2e3c73e0883a2bdfa525fc6fe4e10d30971d9651.tar.gz
[lcd4linux @ 2004-06-02 05:27:59 by reinelt]
added documentation tree
Diffstat (limited to '')
-rw-r--r--documentation/Makefile32
-rw-r--r--documentation/Makefile.generic59
2 files changed, 91 insertions, 0 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
new file mode 100644
index 0000000..47425e4
--- /dev/null
+++ b/documentation/Makefile
@@ -0,0 +1,32 @@
+REP= lcd4linux drivers plugins
+
+default: makefiles html
+ true
+
+makefiles:
+ @for i in $(REP) ; do \
+ (cd $$i && ln -sf ../Makefile.generic Makefile) ; \
+ done
+
+cleanmakefiles:
+ @for i in $(REP) ; do \
+ rm -f $$i/Makefile ; \
+ done
+
+totalclean:
+ @for i in $(REP) ; do \
+ (cd $$i && make clean ; rm Makefile) ; \
+ done
+ rm -rf HTML
+
+#catalog: catalogue.xml xsl/catalogue.xsl
+# test -d catalog || mkdir catalog
+# xsltproc --param dir \'$(PWD)\' \
+# --param odir \'$(PWD)/catalog\' \
+# xsl/catalogue.xsl catalogue.xml >catalog/index.html
+# cp charte/default/default.css catalog/
+
+%:
+ @for i in $(REP) ; do \
+ (cd $$i && make $@) ; \
+ done
diff --git a/documentation/Makefile.generic b/documentation/Makefile.generic
new file mode 100644
index 0000000..2519f22
--- /dev/null
+++ b/documentation/Makefile.generic
@@ -0,0 +1,59 @@
+# Path
+DIR = $(notdir $(PWD))
+OUTPUT = ../HTML
+
+ifeq "$(DIR)" "lcd4linux"
+ DIR =
+endif
+
+ifeq "$(DIR)" ""
+ XSLTPROC = xsltproc
+else
+ XSLTPROC = xsltproc --stringparam class $(DIR) --stringparam root "../"
+endif
+
+XMLVALID = xmllint --noout --valid
+
+NAMES=$(shell find . -name "*.xml" -exec basename {} .xml \;)
+
+html: $(patsubst %.xml,%.html,$(wildcard *.xml))
+html-forced: $(patsubst %.xml,%.html-forced,$(wildcard *.xml))
+
+%.html: %.xml %.xml-check output
+ $(XSLTPROC) $< > $(OUTPUT)/$(DIR)/$@
+
+%.html-forced: %.xml output
+ $(XSLTPROC) $< > $(OUTPUT)/$(DIR)/$(patsubst %.xml,%.html,$<)
+
+check: $(patsubst %.xml, %.xml-check, $(wildcard *.xml))
+
+%.xml-check: %.xml
+ @echo "*** Validation of $<"
+ $(XMLVALID) $<
+
+output:
+ test -d $(OUTPUT) || `mkdir $(OUTPUT); cp ../data/doc.css $(OUTPUT); cp -R ../data/images $(OUTPUT)`
+ test -d $(OUTPUT)/$(DIR) || mkdir $(OUTPUT)/$(DIR)
+
+clean:
+ rm -f $(OUTPUT)/$(DIR)/*.html
+
+clean-bak:
+ rm -f *~ *.bak
+
+help:
+ @echo -e ""
+ @echo -e "Usage :"
+ @echo -e "-------"
+ @echo -e "make or make html : builds all possible html pages from xml files"
+ @echo -e "make %.html : builds the %.html page from %.xml"
+ @echo -e ""
+ @echo -e "make html-forced : builds all possible html pages from xml files (no validity check)"
+ @echo -e "make %.html-forced : builds the %.html page from %.xml (no validity check)"
+ @echo -e ""
+ @echo -e "make check : checks the validity of all possible xml files"
+ @echo -e "make %.xml-check : checks the validity of %.xml"
+ @echo -e ""
+ @echo -e "make clean : deletes all generated html pages"
+ @echo -e "make clean-bak : deletes *~ and *.bak files"
+ @echo -e ""