I hate to carp, but I'm going to have to. This is a 1000-file patch that
by its own admission does not work, meaning reviewers can not test it.
I understand the goal is to make NIX more accessible to non-Plan 9
users. I think that's a good goal. I just don't see how this approach
gets us there.
I'd like to propose a different approach. Shells all provide the same
basic primitives, as do make commands. They can spawn processes,
redirect IO, set up pipes. So take a standard NIX source tree, and aim
for the lowest common denominator. Create mkfiles that gmake can process
as well as mk. Or at least make mkfiles that look like:
</$objtype/mkfile
<make.common
and
include $objtype/makefile
include make.common
(This is what Russ proposed when I tried to put mkfiles into Go. He made
it clear it was not acceptable to have two entirely parallel sets of
recipes, unless the one simply included the other. He was right.)
Same with shell scripts. Get rid of constructs that are not common to sh
and rc. If you've got a for loop over 5 directories, which we do, then
just break it out into five sets of commands. Yes, ugly, but I think two
parallel sets of mkfiles/makefile and rc scripts/sh scripts is going to
be much harder to deal with.
Failing that, I think this set of changes needs to come in gradually, in
working form, in a way that we can test it. This patch is more than I
can understand. Sorry, I'm slow.
Every file you add should be considered another barrier to acceptance in
other communities. Hence, for every file you add, you might want to show
how you are removing a file.
This is a neat idea, but it needs another iteration, and I think it has
to be added in an incremental manner in a way in which everything always
keeps working. That was an original goal of NIX anyway -- everything
keeps working.
Another approach, which I'm more comfortable with, would be to change 6?
so they build under both gcc and Plan 9 -- easy, been done, see Go! --
and then use those to build the rest of the binaries. I still think that
can work.
http://codereview.appspot.com/6060047/