Changeset 51e3d23
- Timestamp:
- 09/23/2007 01:23:16 PM (17 years ago)
- Branches:
- experimental
- Children:
- 3b6adab
- Parents:
- 570c9f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LFS/lfs.xsl
r570c9f3 r51e3d23 88 88 VERSION=0.0.0 89 89 TARBALL=dummy-0.0.0.tar.bz2 90 </xsl:text> 91 <xsl:call-template name="unpack"/> 92 <xsl:text> 90 </xsl:text> 91 <xsl:call-template name="disk_usage"/> 92 <xsl:call-template name="unpack"/> 93 <xsl:text> 93 94 cd $PKGDIR 94 95 ./configure --prefix=/usr … … 97 98 make install 98 99 </xsl:text> 100 <xsl:call-template name="disk_usage"/> 99 101 <xsl:call-template name="clean_sources"/> 100 102 <xsl:call-template name="footer"/> … … 124 126 VERSION=0.0.0 125 127 TARBALL=dummy-0.0.0.tar.bz2 126 </xsl:text> 127 <xsl:call-template name="unpack"/> 128 <xsl:text> 128 </xsl:text> 129 <xsl:call-template name="disk_usage"/> 130 <xsl:call-template name="unpack"/> 131 <xsl:text> 129 132 cd $PKGDIR 130 133 ./configure --prefix=/usr … … 133 136 make install 134 137 </xsl:text> 138 <xsl:call-template name="disk_usage"/> 135 139 <xsl:call-template name="clean_sources"/> 136 140 <xsl:call-template name="footer"/> … … 156 160 TARBALL=dummy-0.0.0.tar.bz2 157 161 </xsl:text> 162 <xsl:call-template name="disk_usage"/> 158 163 <xsl:call-template name="unpack"/> 159 164 <xsl:text> … … 164 169 make install 165 170 </xsl:text> 171 <xsl:call-template name="disk_usage"/> 166 172 <xsl:call-template name="clean_sources"/> 167 173 <xsl:call-template name="footer"/> … … 195 201 <!-- Script header --> 196 202 <xsl:template name="header"> 197 <!-- Set the shabang --> 198 <xsl:choose> 199 <xsl:when test="@id='ch-system-creatingdirs' or 200 @id='ch-system-createfiles' or 201 @id='ch-system-strippingagain'"> 202 <xsl:text>#!/tools/bin/bash
</xsl:text> 203 </xsl:when> 204 <xsl:otherwise> 205 <xsl:text>#!/bin/bash
</xsl:text> 206 </xsl:otherwise> 207 </xsl:choose> 208 <!-- Set +h --> 209 <xsl:text>set +h
</xsl:text> 210 <!-- Set -e --> 211 <xsl:if test="not(@id='ch-tools-stripping') and 212 not(@id='ch-system-strippingagain')"> 213 <xsl:text>set -e
</xsl:text> 214 </xsl:if> 215 <xsl:text>
</xsl:text> 216 </xsl:template> 217 218 219 <!-- Enter to the sources dir, clean it, and unpack the tarball --> 203 <xsl:if test="not(@id='ch-system-chroot') and 204 not(@id='ch-system-revisedchroot')"> 205 <!-- Set the shabang --> 206 <xsl:choose> 207 <xsl:when test="@id='ch-system-creatingdirs' or 208 @id='ch-system-createfiles' or 209 @id='ch-system-strippingagain'"> 210 <xsl:text>#!/tools/bin/bash
</xsl:text> 211 </xsl:when> 212 <xsl:otherwise> 213 <xsl:text>#!/bin/bash
</xsl:text> 214 </xsl:otherwise> 215 </xsl:choose> 216 <!-- Set +h --> 217 <xsl:text>set +h
</xsl:text> 218 <!-- Set -e --> 219 <xsl:if test="not(@id='ch-tools-stripping') and 220 not(@id='ch-system-strippingagain')"> 221 <xsl:text>set -e
</xsl:text> 222 </xsl:if> 223 <!-- Dump a time stamp --> 224 <xsl:text>
echo -e "\n`date`\n"
</xsl:text> 225 </xsl:if> 226 </xsl:template> 227 228 229 <!-- Dump current disk usage --> 230 <xsl:template name="disk_usage"> 231 <xsl:if test="not(@id='ch-system-chroot') and 232 not(@id='ch-system-revisedchroot')"> 233 <xsl:choose> 234 <xsl:when test="ancestor::chapter[@id='chapter-temporary-tools']"> 235 <xsl:text>echo -e "\nKB: `du -skx --exclude=jhalfs --exclude=lost+found $LFS`\n"
</xsl:text> 236 </xsl:when> 237 <xsl:otherwise> 238 <xsl:text>echo -e "\nKB: `du -skx --exclude=jhalfs --exclude=lost+found /`\n"
</xsl:text> 239 </xsl:otherwise> 240 </xsl:choose> 241 </xsl:if> 242 </xsl:template> 243 244 245 <!-- Enter to the sources dir, clean it, unpack the tarball, 246 and reset the seconds counter --> 220 247 <xsl:template name="unpack"> 221 248 <xsl:choose> … … 236 263 fi 237 264 tar -xf $TARBALL 265 SECONDS=0 238 266 </xsl:text> 239 267 </xsl:template> … … 262 290 263 291 264 <!-- Remove sources and build dirs -->292 <!-- Remove sources and build dirs, skipping it from seconds meassurament --> 265 293 <xsl:template name="clean_sources"> 266 294 <xsl:choose> … … 273 301 </xsl:choose> 274 302 <xsl:text> 303 SECS=$SECONDS 275 304 rm -rf $PKGDIR 276 305 rm -rf ${PKGDIR%-*}-build 306 SECONDS=$SECS 277 307 </xsl:text> 278 308 </xsl:template> … … 281 311 <!-- Script footer --> 282 312 <xsl:template name="footer"> 283 <!-- Dump the build time -->313 <!-- Dump the build time and exit --> 284 314 <xsl:if test="not(@id='ch-system-chroot') and 285 315 not(@id='ch-system-revisedchroot')"> 286 <xsl:text>

echo -e "\n\nTotalseconds: $SECONDS\n"
</xsl:text> 287 </xsl:if> 288 <!-- Exit --> 289 <xsl:text>
exit
</xsl:text> 316 <xsl:text> 317 echo -e "\n\nTotalseconds: $SECONDS\n" 318 319 exit 320 </xsl:text> 321 </xsl:if> 290 322 </xsl:template> 291 323 … … 350 382 TARBALL=dummy-0.0.0.tar.bz2 351 383 </xsl:text> 384 <xsl:call-template name="disk_usage"/> 352 385 <xsl:call-template name="unpack"/> 353 386 <xsl:text> … … 358 391 make install 359 392 </xsl:text> 393 <xsl:call-template name="disk_usage"/> 360 394 <xsl:call-template name="clean_sources"/> 361 395 <xsl:call-template name="footer"/> … … 454 488 <xsl:with-param name="phase" select="$filename"/> 455 489 </xsl:apply-templates> 490 <xsl:call-template name="disk_usage"/> 456 491 <xsl:if test="sect2[@role='installation']"> 457 492 <xsl:call-template name="unpack"/> … … 462 497 <xsl:call-template name="post_commands"/> 463 498 <xsl:call-template name="user_footer"/> 499 <xsl:call-template name="disk_usage"/> 464 500 <xsl:if test="sect2[@role='installation']"> 465 501 <xsl:call-template name="clean_sources"/>
Note:
See TracChangeset
for help on using the changeset viewer.