generate jp_job_attrs.h
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 9 Sep 2005 12:37:55 +0000 (12:37 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 9 Sep 2005 12:37:55 +0000 (12:37 +0000)
org.glite.lb.server/Makefile
org.glite.lb.server/src/jp_job_attrs.xsl [new file with mode: 0644]

index a1ce060..6b23dc2 100644 (file)
@@ -36,7 +36,7 @@ GSOAP_FILES_PREFIX:= bk_ws_
 YACC=bison -y
 CC=gcc
 
-VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/project
+VPATH=${top_srcdir}/interface:${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples:${top_srcdir}/project
 AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
 
 TEST_LIBS:=-L${cppunit}/lib -lcppunit
@@ -72,6 +72,7 @@ SOLINK:=libtool --mode=link ${CC} -module ${LDFLAGS} -rpath ${stagedir}/lib
 LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} 
 INSTALL:=libtool --mode=install install
 LINKXX:=libtool --mode=link  ${CXX} -rpath ${stagedir}/lib ${LDFLAGS}
+XSLTPROC:=xsltproc
 
 GLOBUS_LIBS:= -L${globus_prefix}/lib \
        -lglobus_common_${nothrflavour} \
@@ -251,6 +252,9 @@ ${STATIC_LIB_BK}: ${LIB_OBJS_BK}
        ar crv $@ ${LIB_OBJS_BK}
        ranlib $@
 
+jp_job_attrs.h: job-attrs.xsd jp_job_attrs.xsl 
+       ${XSLTPROC} ../src/jp_job_attrs.xsl $< >$@
+
 doc:
 
 stage: compile
@@ -270,7 +274,7 @@ distbin:
        rm -rf tmpbuilddir
         
 install:
-       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d
+       -mkdir -p ${PREFIX}/bin ${PREFIX}/etc ${PREFIX}/etc/init.d ${PREFIX}/interface
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        -mkdir -p ${PREFIX}/lib
        ${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
@@ -283,6 +287,8 @@ install:
        done
 
        ${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-lb-bkserverd
+       ${INSTALL} -m 644 ${top_srcdir}/interface/job-attrs.xsd ${PREFIX}/interface
+       ${INSTALL} -m 644 ${top_srcdir}/interface/job-record.xsd ${PREFIX}/interface
 
        if [ x${DOSTAGE} != xyes ]; then \
                ${INSTALL} -m 755 ${stagedir}/bin/glite-lb-notif-interlogd ${PREFIX}/bin; \
diff --git a/org.glite.lb.server/src/jp_job_attrs.xsl b/org.glite.lb.server/src/jp_job_attrs.xsl
new file mode 100644 (file)
index 0000000..78d77a4
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+       xmlns:xs="http://www.w3.org/2001/XMLSchema"
+>
+
+<xsl:output method="text"/>
+
+<xsl:template match="xs:schema">
+#ifndef __GLITE_LB_JP_JOB_ATTR_H
+#define __GLITE_LB_JP_JOB_ATTR_H
+#define GLITE_JP_LB_NS "http://egee.cesnet.cz/en/Schema/LB/Attributes"
+       <xsl:apply-templates select="xs:element"/>
+#endif
+</xsl:template>
+
+<xsl:template match="xs:element">
+/** <xsl:value-of select="xs:documentation/text()"/> */
+#define GLITE_JP_LB_<xsl:value-of select="@name"/>     GLITE_JP_LB_NS &quot;:<xsl:value-of select="@name"/>&quot;
+</xsl:template>
+
+</xsl:stylesheet>