Making configurable the top-level sources build directory.

This commit is contained in:
Manuel Canales Esparcia 2006-08-14 18:45:31 +00:00
parent 57c7bfeeab
commit f65d3cb63b
2 changed files with 12 additions and 6 deletions

View file

@ -4,7 +4,7 @@
#
# $Id$
#
# Set default SRC_ARCHIVE and FTP_DIR
# Set default envars used in the build scripts
#
#####
@ -20,3 +20,9 @@ export SRC_ARCHIVE=$SRC_ARCHIVE
# The server path MUST be set as listed in
# http://www.linuxfromscratch.org/blfs/download.html
export FTP_SERVER=ftp://anduin.linuxfromscratch.org/BLFS/
#--- The sources directory.
# Full path to the top level directory where packages will be stored,
# unpacked, and compiled.
export SRC_DIR=$HOME/sources

View file

@ -97,14 +97,14 @@
<xsl:value-of select="$package"/>
<xsl:text>&#xA;PKG_DIR=</xsl:text>
<xsl:value-of select="$ftpdir"/>
<xsl:text>&#xA;&#xA;</xsl:text>
<xsl:text>SRC_DIR=$SRC_DIR&#xA;&#xA;</xsl:text>
<!-- Download code and build commands -->
<xsl:apply-templates select="sect2">
<xsl:with-param name="package" select="$package"/>
<xsl:with-param name="ftpdir" select="$ftpdir"/>
</xsl:apply-templates>
<!-- Clean-up -->
<xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
<xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
<xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
</xsl:when>
<!-- Non-package page -->
@ -125,8 +125,8 @@
<xsl:param name="ftpdir" select="foo"/>
<xsl:choose>
<xsl:when test="@role = 'package'">
<xsl:text>mkdir -p ~/sources/$PKG_DIR&#xA;</xsl:text>
<xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
<xsl:text>mkdir -p $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
<xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
<xsl:apply-templates select="itemizedlist/listitem/para">
<xsl:with-param name="package" select="$package"/>
<xsl:with-param name="ftpdir" select="$ftpdir"/>