On Fri, 7 Dec 2001, Andy Dougherty wrote:

> On Fri, 7 Dec 2001, Bryan C. Warnock wrote:
>
> > On Friday 07 December 2001 08:43 am, Andy Dougherty wrote:
> > > Funny you should mention that, because Perl's Configure does things in
> > > order determined by 'Dependency-ish rules, a la make'.  Configure is
> > > indeed built in just the way you suggest.
>
> > Except, of course, for being one big honking file.
>
> That's a mere implementation detail :-).  (Though one that's admittedly
> quite intimidating!)  It isn't one big file until the very very end step.
> There's no reason it couldn't be a file that simply called a series of
> tiny scripts
>
>       #!/bin/sh
>       . U/intro
>       . U/find-shell
>       . U/cmdline
>       . U/find-hints
>
> etc., except that it would then be even slower than it already is.
> (Probably not a significant effect now, but it would have been when
> Configure was originally designed.)

I was thinking more along the lines of BSD-booting:

#!/bin/sh

for x in `ls U/* | sort`; do
  $x
done

Performance really shouldn't be that big of a deal, though ls/sort +
the whole shell-script nature are rather unix-centric.  A perl5 based
configure could easily be:

#!perl

opendir DH, "U";
@files = sort { $a cmp $b } grep { /^\d/ } readdir DH;
system($_) for @files;


The reason for execing, and not sourcing was to allow local variables
within each module (a-la the BSD inet.d files), but that's optional if
performance is really an issue (don't see why it should)

Now People just add conf-files and produce their own dependancy list.
Since we're comparing strings, not numbers, sub-versions work like the
library of congress..

1
2 (dep on 1)
3 (dep on 2)
25 (comes before 3)
26
255 (comes before 26)
....


Though that might look a bit confusing; we can always use "%02i" notation.


-Michael

Reply via email to