Module: sip-router
Branch: master
Commit: c3c84162a96f6ff110c575d151543ec28b827752
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3c84162a96f6ff110c575d151543ec28b827752

Author: Ovidiu Sas <[email protected]>
Committer: Ovidiu Sas <[email protected]>
Date:   Wed Dec 12 17:10:01 2012 -0500

xhttp_pi: new target for makefile to generate framework templates

---

 lib/srdb1/schema/Makefile |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/lib/srdb1/schema/Makefile b/lib/srdb1/schema/Makefile
index 003a48f..b84ffb2 100644
--- a/lib/srdb1/schema/Makefile
+++ b/lib/srdb1/schema/Makefile
@@ -9,6 +9,12 @@ ROOT=../../../
 STYLESHEETS=$(ROOT)/doc/stylesheets/dbschema_k/xsl
 SCHEME=$(ROOT)/utils/kamctl/
 
+#Stylesheet used to generate db_table nodes for pi_framework XML schema
+PI_FRAMEWORK_TABLE_XSL = $(STYLESHEETS)/pi_framework_table.xsl
+
+# Stylesheet used to generate mod nodes for pi_framework XML schema
+PI_FRAMEWORK_MOD_XSL = $(STYLESHEETS)/pi_framework_mod.xsl
+
 # Stylesheet used to generate MySQL database schema
 MYSQL_XSL = $(STYLESHEETS)/mysql.xsl
 
@@ -59,7 +65,32 @@ ifeq ($(VERBOSE), 1)
        override XSLTPROC := $(XSLTPROC) --verbose
 endif
 
-all: mysql postgres dbtext db_berkeley db_sqlite docbook oracle #modules dbdoc
+all: mysql postgres dbtext db_berkeley db_sqlite docbook oracle pi_framework 
#modules dbdoc
+
+.PHONY: pi_framework pi_framework_clean
+pi_framework:
+       for FILE in $(TABLES); do \
+               XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
+               --stringparam dir "$(SCHEME)/xhttp_pi" \
+               --stringparam prefix "$$FILE-" \
+               $(PI_FRAMEWORK_TABLE_XSL) kamailio-"$$FILE".xml ; \
+       done
+       for FILE in $(TABLES); do \
+               XML_CATALOG_FILES=$(CATALOG) $(XSLTPROC) $(XSLTPROC_FLAGS) \
+               --stringparam dir "$(SCHEME)/xhttp_pi" \
+               --stringparam prefix "$$FILE-" \
+               $(PI_FRAMEWORK_MOD_XSL) kamailio-"$$FILE".xml ; \
+       done
+       cat $(SCHEME)/xhttp_pi/pi_framework-00 \
+               $(SCHEME)/xhttp_pi/*-table \
+               $(SCHEME)/xhttp_pi/pi_framework-01 \
+               $(SCHEME)/xhttp_pi/*-mod \
+               $(SCHEME)/xhttp_pi/pi_framework-02 > \
+               $(SCHEME)/xhttp_pi/pi_framework.xml
+
+pi_framework_clean:
+       -@rm -f $(ROOT)/scripts/xhttp_pi/*-table
+       -@rm -f $(ROOT)/scripts/xhttp_pi/*-mod
 
 .PHONY: mysql mysql_clean
 mysql:
@@ -235,4 +266,4 @@ dbdoc_clean:
        done
 
 .PHONY: clean
-clean: mysql_clean postgres_clean oracle_clean dbtext_clean db_berkeley_clean 
db_sqlite_clean docbook_clean # modules_clean dbdoc_clean
+clean: mysql_clean postgres_clean oracle_clean dbtext_clean db_berkeley_clean 
db_sqlite_clean pi_framework_clean docbook_clean # modules_clean dbdoc_clean


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to