Dave Mitchell:
# Simon Cozens <[EMAIL PROTECTED]> wrote:
# > IANDan, but here's the plan as I see it.
# >
# >     1) Move to using make.pl instead of system's make
# >     2) Compile both make.pl and Configure.pl to Parrot bytecode
# >     3) Create a miniparrot which builds anywhere and can
# run the above
# >        programs and bootstrap itself to real parrot.
#
# This will be nice if we can do it. I do rather wonder how we're going
# to achieve (3) though. In order for miniparrot to run make.pl
# it needs to
# have fairly good I/O, file test, and system() capabilities, all of
# which seem wildly system dependent. Do we use a glorified
# hints file to
# build miniperl or wot ?

stdio is pretty std, right?  That ought to be enough for Configure--we
can compile a stdio.ops into miniparrot.  I doubt we'll need the full
ParrotIO subsystem just for building.  The most complicated thing we'll
have to do is probably backticks, and that can be easily emulated with
system() and redirection.  (We'll also have to do regex matches against
the backticks, but I'm working on that one. ;^) )


        prompt:
                #S0=question, S1=key, S2 modified
                #no return value
                #P6=%c

                set S2, P6, [S1]

                stdio_print 1, S0
                stdio_print 1, "["
                stdio_print 1, S2
                stdio_print 1, "] "
                stdio_readline 0, S2
                chopn S2, 0

                if S2, $yup
                ret
        $yup:
                set P6, [S1], S2
                ret

        cc_obj:
                #S0=in, S1=out, S2 modified
                #returns in I0

                set S2, P6, ["cc"]
                concat S2, S2, P6, ["ccflags"]
                concat S2, S2, S0
                concat S2, S2, P6, ["ccflags_obj"]
                concat S2, S2, S1

                system I0, S2
                if I0, $crap
                ret
        $crap:
                die "cc_obj: C compiler returned an error."
                ret

--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6

"Nothing important happened today."
    --George III of England's diary entry for 4-Jul-1776

Reply via email to