[Spacewalk-devel] [PATCH] Add documentation makefile target for schema docs

James Bowes jbowes at redhat.com
Mon Jun 23 08:45:33 EDT 2008


---
 documentation/Makefile                          |   14 +++++++++++++-
 documentation/how-to-generate-documentation.txt |   11 ++++++-----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/documentation/Makefile b/documentation/Makefile
index eb4c0aa..a86d631 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -22,7 +22,15 @@ JAVA_DOC_SRC_PATH := ../java/code/src/
 JAVA_DOC_SUBPKGS := "com"
 JAVA_DOC_DIR := java-doc
 
+# Schema Docs
+# Created with DB Schema (http://oraschemadoc.sourceforge.net/)
+# Requires CX_Oracle and graphviz
+ORASCHEMADOC ?= oraschemadoc.py
+DSN ?= user/pass at db
+SCHEMA_DOC_DIR ?= db-schema
+
 # TARGETS
+# schema is not incldued here, since you need a live db
 all: python java
 
 python:
@@ -36,8 +44,12 @@ python:
 java:
 	$(JAVA_DOC_BIN) -source $(JAVA_DOC_SRC_VERSION) -d $(JAVA_DOC_DIR) -sourcepath $(JAVA_DOC_SRC_PATH) -subpackages $(JAVA_DOC_SUBPKGS) java -J-Xmx512m >/dev/null
 
+schema:
+	$(ORASCHEMADOC) --dia schema.dia --syntax --pb $(DSN) \
+		$(SCHEMA_DOC_DIR) "Spacewalk DB Schema"
+
 clean:
 	rm -rf build/
 
 distclean:
-	rm -rf build/ $(PYTHON_DOC_DIR) $(JAVA_DOC_DIR)
+	rm -rf build/ $(PYTHON_DOC_DIR) $(JAVA_DOC_DIR) $(SCHEMA_DOC_DIR)
diff --git a/documentation/how-to-generate-documentation.txt b/documentation/how-to-generate-documentation.txt
index 239b3d3..1b6272f 100644
--- a/documentation/how-to-generate-documentation.txt
+++ b/documentation/how-to-generate-documentation.txt
@@ -1,13 +1,14 @@
 documentation for java and python:
-make all
+    make all
 
 documentation for java:
-make java
+    make java
 
 documentation of python:
-make python
+    make python
 
 documentation for the db schema:
+    ORASCHEMADOC=/path/to/oraschemadoc.py DSN=user/pass at db make schema
+
 DB Schema is created using http://oraschemadoc.sourceforge.net/
-oraschemadoc.py --dia schema.dia --syntax --pb user/pass at sid /tmp/schema-doc "Spacewalk DB Schema"
-It require cx_Oracle and graphviz as requirements. 
+Which requires cx_Oracle and graphviz.
-- 
1.5.5.1




More information about the Spacewalk-devel mailing list