The usage of base as an attribute over an element?

Jesse Tie-Ten-Quee highos at linuxfromscratch.org
Wed Apr 10 02:48:02 PDT 2002


Yo,

Here, take a look at this profile.  It's fairly basic, just describes
the installation of wget.

You will problably notice two things about the syntax used here.  The
first is i've used <stage /> here, so i could get a better idea of how
it would look for "real world purposes".  And the second is the usage of
base as an attribute over an element.

Dunno.. in some ways it does make it alot harder to read, however that
really is more of a "personal preference" thing.  Mixing the usage of
attributes and elements...dunno.  We have kinda gone pretty extreme with
elements, compared to the "prototype" (aka version 1.0 you guys like to
call it) where we were totally attributes.

Thoughs?  A mix can't be bad.  Either way.. I keep thinking about
Neven's remark about XSLT, so I may fairly soon just totally drop this
hole nonesense about getting this "perfect" right from the bat =)

-- 
Jesse Tie-Ten-Quee  ( highos at linuxfromscratch dot org )
-------------- next part --------------
<?xml version="1.0"?>

<!DOCTYPE alfs [

<!ENTITY pkg.dir "/tmp/pkg">
<!ENTITY bld.dir "/tmp">

<!ENTITY wget.pkg "wget-&wget.ver;.tar.gz">
<!ENTITY wget.dir "wget-&wget.ver;">
<!ENTITY wget.ver "1.8.1">
<!ENTITY wget.pfx "/tmp/usr">

]>

<alfs>

    <package>
	<info>
	    <name>wget</name>
	    <version>&wget.ver;</version>
	</info>

	<stage name="unpack">
	    <unpack>
		<source>&pkg.dir;/&wget.pkg;</source>
		<destination>&bld.dir;</destination>
	    </unpack>
	</stage>

	<stage name="setup">
	    <configure base="&bld.dir;/&wget.dir;">
		<option>--prefix=&wget.pfx;</option>
		<option>--mandir=&wget.pfx;/share/man</option>
		<option>--infodir=&wget.pfx;/share/info</option>
	    </configure>
	</stage>

	<stage name="build">
	    <make base="&bld.dir;/&wget.dir;" />
	</stage>

	<stage name="install">
	    <make base=">&bld.dir;/&wget.dir;">
		<option>install</option>
	    </make>
	</stage>

	<stage name="cleanup">
	    <remove>&bld.dir;/&wget.dir;</remove>
	</stage>
    </package>

</alfs>


More information about the alfs-discuss mailing list