summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile32
-rwxr-xr-xlib/make/ArrangementDoc40
-rwxr-xr-xlib/make/ThornDoc45
3 files changed, 113 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 84deffe9..735a806e 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
#
#
# @enddesc
-# @version $Id: Makefile,v 1.145 2003-10-13 17:22:43 schnetter Exp $
+# @version $Id: Makefile,v 1.146 2003-10-13 18:58:00 schnetter Exp $
# @@*/
##################################################################################
@@ -341,6 +341,11 @@ else
@echo " -examples : copies thorn parameter files to examples directory."
endif
@echo $(DIVIDER)
+ @echo There are options available to act on thorns.
+ @echo These are activated by $(MAKE) \<thorn-name\>-\<option\>
+ @echo Valid options are
+ @echo " -ThornDoc : produces the documentation for the thorn."
+ @echo $(DIVIDER)
@echo $(MAKE) also knows the following targets
@echo
@echo " checkout - checkout public arrangements/thorns."
@@ -359,9 +364,12 @@ endif
@echo " tags - creates a Vi TAGS file."
@echo " thorninfo - give information about all available "
@echo " thorns."
- @echo " UsersGuide - creates users guide UsersGuide.ps."
- @echo " ReferenceManual - creates reference manual ReferenceManual.ps."
- @echo " ThornGuide - creates the thorn manual ThornGuide.ps"
+ @echo " UsersGuide - creates users manual doc/UsersGuide.ps."
+ @echo " ReferenceManual - creates reference manual doc/ReferenceManual.ps."
+ @echo " ThornGuide - creates the thorn manual doc/ThornGuide.ps"
+ @echo " ThornDoc - creates documentation for all thorns in doc/ThornDoc"
+ @echo " ArrangementDoc - creates documentation for all arrangements"
+ @echo " in doc/ArrangementDoc"
@echo " <anything else> - prompts to create such a configuration."
@echo $(DIVIDER)
@@ -1012,6 +1020,22 @@ endif
@echo Configuration $(@:%-ThornGuide=%) does not exist.
@echo Thorn Guide creation aborted.
+# Make the ThornGuide
+
+.PHONY: ThornDoc
+%-ThornDoc:
+ @echo "$(DIVIDER)"
+ @lib/sbin/ThornDoc $(@:%-ThornDoc=%)
+ @echo $(DIVIDER)
+ThornDoc:
+ @echo "$(DIVIDER)"
+ @lib/sbin/ThornDoc
+ @echo $(DIVIDER)
+ArrangementDoc:
+ @echo "$(DIVIDER)"
+ @lib/sbin/ArrangementDoc
+ @echo $(DIVIDER)
+
###############################################################################
# End of documentation targets
###############################################################################
diff --git a/lib/make/ArrangementDoc b/lib/make/ArrangementDoc
new file mode 100755
index 00000000..46dfe053
--- /dev/null
+++ b/lib/make/ArrangementDoc
@@ -0,0 +1,40 @@
+#! /bin/sh
+# Create all arrangement documentations
+# (C) 2003-07-21 Erik Schnetter <schnetter@uni-tuebingen.de>
+# $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/ArrangementDoc,v 1.1 2003-10-13 18:58:00 schnetter Exp $
+
+echo "Creating arrangement documentations..."
+
+# Selected arrangement; process all arrangements if this is empty
+selection="$1"
+
+for arr in `cd arrangements; echo *`; do
+ if test -d arrangements/$arr; then
+ if test -z "$selection" || test "$arr" == "$selection"; then
+ if test -e arrangements/$arr/doc/documentation.tex; then
+ echo " Processing arrangement $arr..."
+
+ mkdir doc/ArrangementDoc 2> /dev/null
+ mkdir doc/ArrangementDoc/$arr 2> /dev/null
+ (
+ cd doc/ArrangementDoc/$arr/$th
+ rm -f documentation.tex documentation.dvi documentation.ps
+ path=../../../arrangements/$arr/$th/doc
+ sed -e 's+\(\\includegraphics.*\){ *\(.*\) *}+\1{'"$path"'/\2}+g' < $path/documentation.tex > documentation.tex
+
+ {
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ dvips documentation.dvi -o documentation.ps > DVIPS_MESSAGES 2>&1
+ } ||
+ echo " ERROR: Could not create documentation (check for latex errors)"
+ )
+
+ fi # if arrangement has documentation
+ fi # if arrangement is enabled
+ fi
+done # for arrangements
+
+echo " Created thorn documentations in doc/ArrangementDoc directory."
+echo " Done."
diff --git a/lib/make/ThornDoc b/lib/make/ThornDoc
new file mode 100755
index 00000000..67a36ed7
--- /dev/null
+++ b/lib/make/ThornDoc
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Create all thorn documentations
+# (C) 2003/05/24 Erik Schnetter <schnetter@uni-tuebingen.de>
+# $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/ThornDoc,v 1.1 2003-10-13 18:58:00 schnetter Exp $
+
+echo "Creating thorn documentations..."
+
+# Selected thorn; process all thorns if this is empty
+selection="$1"
+
+for arr in `cd arrangements; echo *`; do
+ if test -d arrangements/$arr; then
+ for th in `cd arrangements/$arr; echo *`; do
+ if test -d arrangements/$arr/$th; then
+ if test -z "$selection" || test "$th" == "$selection"; then
+ if test -e arrangements/$arr/$th/doc/documentation.tex; then
+ echo " Processing thorn $arr/$th..."
+
+ mkdir doc/ThornDoc 2> /dev/null
+ mkdir doc/ThornDoc/$arr 2> /dev/null
+ mkdir doc/ThornDoc/$arr/$th 2> /dev/null
+ (
+ cd doc/ThornDoc/$arr/$th
+ rm -f documentation.tex documentation.dvi documentation.ps
+ path=../../../../arrangements/$arr/$th/doc
+ sed -e 's+\(\\includegraphics.*\){ *\(.*\) *}+\1{'"$path"'/\2}+g' < $path/documentation.tex > documentation.tex
+
+ {
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ latex documentation < /dev/null > LATEX_MESSAGES 2>&1 &&
+ dvips documentation.dvi -o documentation.ps > DVIPS_MESSAGES 2>&1
+ } ||
+ echo " ERROR: Could not create documentation (check for latex errors)"
+ )
+
+ fi # if thorn has documentation
+ fi # if thorn is enabled
+ fi
+ done # for thorns
+ fi
+done # for arrangements
+
+echo " Created thorn documentations in doc/ThornDoc directory."
+echo " Done."