cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-cocoon2/tools/src blocks-build.xsl
Date Wed, 18 Dec 2002 20:05:49 GMT
nicolaken    2002/12/18 12:05:48

  Modified:    tools/src blocks-build.xsl
  Log:
  Fix a build system bug that was preventing blocks without samples
  or mocks to be build is a block that had them was built before.
  This is because Ant has immutable properties.
  Thanks again to Heinrichs-Wolpert for pointing it out.
  
  Revision  Changes    Path
  1.13      +16 -14    xml-cocoon2/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/tools/src/blocks-build.xsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- blocks-build.xsl	3 Dec 2002 16:54:00 -0000	1.12
  +++ blocks-build.xsl	18 Dec 2002 20:05:48 -0000	1.13
  @@ -50,7 +50,16 @@
           <filter token="JDBC3_END" value="/*"/>
         </target>
   
  -      <target name="-single-project-samples" if="currentblock.has.sample">
  +            
  +      <xsl:apply-templates select="project" />
  +   </xsl:template>
  +
  +   <xsl:template match="project">
  +      <xsl:variable name="current-project-target" select="@name" />
  +
  +      <xsl:variable name="block-name" select="substring-before(@name,'-block')" />
  +      
  +     <target name="-{@name}-project-samples" if="{@name}.has.sample">
            <property name="currentblock.dir">
               <xsl:attribute name="value">${blocks.dir}/${currentblock.name}</xsl:attribute>
            </property>
  @@ -63,7 +72,7 @@
            </copy>
         </target>
   
  -      <target name="-single-project-mocks" if="currentblock.has.mocks">
  +      <target name="-{@name}-project-mocks" if="{@name}.has.mocks">
            <path id="currentblock.classpath">
               <fileset>
                  <xsl:attribute name="dir">${lib.dir}</xsl:attribute>
  @@ -111,8 +120,7 @@
            
         </target>
         
  -            
  -      <target name="-single-project" depends="-single-project-mocks,-single-project-samples,prepare-jdbc,prepare-database-connection">
  +      <target name="-{@name}-project" depends="-{@name}-project-mocks,-{@name}-project-samples,prepare-jdbc,prepare-database-connection">
   
            <property name="currentblock.dir">
               <xsl:attribute name="value">${blocks.dir}/${currentblock.name}</xsl:attribute>
  @@ -283,13 +291,7 @@
   
         </target>
   
  -      <xsl:apply-templates select="project" />
  -   </xsl:template>
  -
  -   <xsl:template match="project">
  -      <xsl:variable name="current-project-target" select="@name" />
  -
  -      <xsl:variable name="block-name" select="substring-before(@name,'-block')" />
  +            
   
         <target name="{$current-project-target}" if="cocoon.blocks.{$block-name}.include">
   <!-- if there is a dependency... -->
  @@ -299,12 +301,12 @@
            </xsl:if>
   
            <!-- Test if this block has a sample -->
  -         <available property="currentblock.has.sample">
  +         <available property="{$block-name}.has.sample">
                <xsl:attribute name="file">${blocks.dir}/<xsl:value-of select="$block-name"/>/samples/sitemap.xmap</xsl:attribute>
            </available>
   
            <!-- Test if this block has a sample -->
  -         <available property="currentblock.has.mocks" type="dir">
  +         <available property="{$block-name}.has.mocks" type="dir">
                <xsl:attribute name="file">${blocks.dir}/<xsl:value-of select="$block-name"/>/mocks/</xsl:attribute>
            </available>
            
  @@ -316,7 +318,7 @@
              <echo message="-----------------------------------------------"/>
            </xsl:if>
            
  -         <antcall target="-single-project">
  +         <antcall target="-{@name}-project">
               <param name="currentblock.name" value="{$block-name}" />
            </antcall>
         </target>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message