rubys 01/10/08 08:13:19
Modified: proposal/gump/stylesheet bash.xsl build.xsl win2k.xsl
Log:
Make build clean a separate target
Revision Changes Path
1.46 +5 -14 jakarta-alexandria/proposal/gump/stylesheet/bash.xsl
Index: bash.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/bash.xsl,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- bash.xsl 2001/10/08 09:44:41 1.45
+++ bash.xsl 2001/10/08 15:13:19 1.46
@@ -28,7 +28,7 @@
<xsl:text>all) </xsl:text>
<xsl:text> export all=1 </xsl:text>
- <xsl:for-each select=".//project | .//module">
+ <xsl:for-each select=".//project[not @name=clean] | .//module">
<xsl:text> export </xsl:text>
<xsl:value-of select="translate(@name,'-.','__')"/>
<xsl:text>=1 </xsl:text>
@@ -63,7 +63,7 @@
<xsl:call-template name="select">
<xsl:with-param name="usage">
- Usage: build all \| project [target...]
+ Usage: build all \| clean \| project [target...]
</xsl:with-param>
</xsl:call-template>
@@ -424,18 +424,9 @@
<!-- =================================================================== -->
<xsl:template match="delete">
- <xsl:choose>
- <xsl:when test="@fork='yes'">
- <xsl:text>rm -rf </xsl:text>
- <xsl:value-of select="translate(@dir,'\','/')"/>
- <xsl:text>& </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>eval "rm -rf </xsl:text>
- <xsl:value-of select="translate(@dir,'\','/')"/>
- <xsl:text> $OUT 2>&1" </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:text>eval "rm -rf </xsl:text>
+ <xsl:value-of select="translate(@dir,'\','/')"/>
+ <xsl:text> $OUT 2>&1" </xsl:text>
</xsl:template>
<!-- =================================================================== -->
1.33 +11 -5 jakarta-alexandria/proposal/gump/stylesheet/build.xsl
Index: build.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/build.xsl,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- build.xsl 2001/10/08 13:49:07 1.32
+++ build.xsl 2001/10/08 15:13:19 1.33
@@ -29,14 +29,19 @@
<delete dir="dist"/>
<!-- clean up old build directories -->
- <mkdir dir="trashbin"/>
- <xsl:for-each select="module[cvs]">
- <move file="{@srcdir}" todir="trashbin"/>
- </xsl:for-each>
- <delete dir="trashbin" fork="yes"/>
+ <project>
+ <logic name="clean">
+ <mkdir dir="trashbin"/>
+ <xsl:for-each select="module[cvs]">
+ <move file="{@srcdir}" todir="trashbin"/>
+ </xsl:for-each>
+ <delete dir="trashbin"/>
+ </logic>
+ </project>
<!-- initialize new build directories -->
<xsl:for-each select="module[cvs]">
+ <delete dir="{@srcdir}"/>
<copy fromdir="{$cvsdir}/{@name}" todir="{@srcdir}"/>
</xsl:for-each>
@@ -75,6 +80,7 @@
<th>Project</th>
<th>Status</th>
</tr>
+
<xsl:apply-templates select="project"/>
</table>
</content>
1.19 +11 -16 jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl
Index: win2k.xsl
===================================================================
RCS file: /home/cvs/jakarta-alexandria/proposal/gump/stylesheet/win2k.xsl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- win2k.xsl 2001/10/08 09:44:41 1.18
+++ win2k.xsl 2001/10/08 15:13:19 1.19
@@ -21,7 +21,8 @@
</xsl:for-each>
<xsl:text>if not "%1"=="" echo Unknown project: %1 </xsl:text>
- <xsl:text>echo Usage: build all ^| project [target...] </xsl:text>
+ <xsl:text>echo Usage: build all ^| clean ^| </xsl:text>
+ <xsl:text>project [target...] </xsl:text>
<xsl:text>goto eoj </xsl:text>
<xsl:text> :header </xsl:text>
@@ -223,6 +224,10 @@
<!-- =================================================================== -->
<xsl:template match="logic">
+ <xsl:if test="@name='clean'">
+ <xsl:text>if "%1"=="all" goto end_clean </xsl:text>
+ </xsl:if>
+
<xsl:text>echo ^<XMP^> %OUT% </xsl:text>
<xsl:text>:</xsl:text>
@@ -372,21 +377,11 @@
<!-- =================================================================== -->
<xsl:template match="delete">
- <xsl:choose>
- <xsl:when test="@fork='yes'">
- <xsl:text>start </xsl:text>
- <xsl:text>rmdir /s /q </xsl:text>
- <xsl:value-of select="translate(@dir,'/','\')"/>
- <xsl:text> </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>if exist </xsl:text>
- <xsl:value-of select="translate(@dir,'/','\')"/>
- <xsl:text> rmdir /s /q </xsl:text>
- <xsl:value-of select="translate(@dir,'/','\')"/>
- <xsl:text> %OUT% 2>&1 </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:text>if exist </xsl:text>
+ <xsl:value-of select="translate(@dir,'/','\')"/>
+ <xsl:text> rmdir /s /q </xsl:text>
+ <xsl:value-of select="translate(@dir,'/','\')"/>
+ <xsl:text> %OUT% 2>&1 </xsl:text>
</xsl:template>
<!-- =================================================================== -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]