Syntax, shall we?

Seth W. Klein sk at
Fri Feb 1 09:25:21 PST 2002

Neven Has <haski at sezampro.yu> wrote:
> On Mon, Jan 28, 2002 at 08:14:54AM -0800, Jesse Tie-Ten-Quee wrote:
> > 
> > <snip>
> > 
> > > Yes, but as you said, without <base>-like tag we would have a ton of
> > > <mkdir> tags. And it would look silly, since they would all have the same
> > > "base" (heh) directory.
> > 
> > Dunno, i'm game to ditch it.. i honestly don't mind spending an extra
> > 5min typing^H^H^H^H^H^Hcopy+pasting.
> Instead of:
> <mkdir>
>     <base>&LFS;/usr/share/man</base>
>     <dir>man1 man2 man3 man4 man5 man6 man7 man8</dir>
> </mkdir>
> use:
> <mkdir>
>     <dir>
>         &LFS;/usr/share/man/man1 &LFS;/usr/share/man/man2
>         &LFS;/usr/share/man/man3 &LFS;/usr/share/man/man4
>         &LFS;/usr/share/man/man5 &LFS;/usr/share/man/man6
>         &LFS;/usr/share/man/man7 &LFS;/usr/share/man/man8
>     </dir>
> </mkdir>
> instead? Copy&pasting or not, this is too much for my taste. :)

Too much for my taste as well. Not so much because i'm lazy (as perl
people tell me all good programmers are), but because i consider it
unelegant. Anyway, what about this:


In other words, <mkdir> may be nested. The directory created is relative
to the directory created by the parent. Multiple directories must not be
specified (which one would nested elements go in?).

This is...
... easy to learn. I think i could use it after merely seeing the example.
... easy to type^H^Hcopy+paste. It doesn't contain redundant information.
... easy to read. Also because it doesn't contain redundant information.

There are two disadvantages i can think of:

When creating multiple directories in a directory created elsewhere in
the code, it is necessary to either:
1) specify the parent directory each time, making no use of nesting
2) recreate the parent directory which risks resetting the permissions
   originally set. This last could be avoided by something to indicate
   that the directory isn't to actually be created, but i think this
   unnecessarily complex.
Because the situation arises so seldom, i would just ignore it.

The other disadvantage i can think of involves this example:


That probably creates /mnt/lfs/usr//share which, while it works correctly
(it creates /mnt/lfs/usr/share without complaining), is slightly confusing.
I do not think this is a problem because the ambiguity is obvious when
looking at the code - acutally, the code is slightly broken and could
be an error though i can see use for accepting it - and the results are
natural and do not involve special cases.

Seth W. Klein
sk at                   
Maintainer, LFS FAQ       
 The guy across the street has this really neat portable snow fountain.
Unsubscribe: send email to listar at
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list