Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
convert Configure to PIR (from Perl)
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 6, 2009
1 parent a8170ec commit 157204c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 68 deletions.
57 changes: 57 additions & 0 deletions Configure.pir
@@ -0,0 +1,57 @@
#! /usr/local/bin/parrot
# Copyright (C) 2009, Parrot Foundation.

.include 'sysinfo.pasm'
.include 'iglobals.pasm'

.sub 'main' :main
load_bytecode 'Configure.pbc'

# Wave to the friendly users
print "Hello, I'm Configure. My job is to poke and prod\n"
print "your system to figure out how to build Lua.\n"

.local pmc config
$P0 = getinterp
config = $P0[.IGLOBALS_CONFIG_HASH]
.local string OS
OS = sysinfo .SYSINFO_PARROT_OS

# Here, do the job
push_eh _handler
genfile('config/makefiles/root.in', 'Makefile', config)
genfile('config/makefiles/pmc.in', 'src/pmc/Makefile', config)
pop_eh

# Give the user a hint of next action
.local string make
make = config['make']
print "Configure completed for platform '"
print OS
print "'.\n"
print "You can now type '"
print make
print "' to build Lua.\n"
print "You may also type '"
print make
print " test' to run the Lua test suite.\n"
print "\nHappy Hacking.\n"
end

_handler:
.local pmc e
.local string msg
.get_results (e)
printerr "\n"
msg = e
printerr msg
printerr "\n"
end
.end

# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:

66 changes: 0 additions & 66 deletions Configure.pl

This file was deleted.

2 changes: 1 addition & 1 deletion config/makefiles/pmc.in
Expand Up @@ -141,7 +141,7 @@ uninstall:
$(RM_F) $(INSTALL_DIR)/$(LUA_GROUP)$(LOAD_EXT)

Makefile: ../../config/makefiles/pmc.in
cd ../.. && $(PERL) Configure.pl
cd ../.. && $(PARROT) Configure.pir

clean:
$(RM_F) $(CLEANUPS)
Expand Down
2 changes: 1 addition & 1 deletion config/makefiles/root.in
Expand Up @@ -334,7 +334,7 @@ installable_luap@exe@: luap.pbc
$(PBC_TO_EXE) luap.pbc --install

Makefile: config/makefiles/root.in
$(PERL) Configure.pl
$(PARROT) Configure.pir

help:
@echo ""
Expand Down

0 comments on commit 157204c

Please sign in to comment.