Skip to content

Commit

Permalink
Use Configure.pir instead of Configure.pl.
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Nov 29, 2009
1 parent 4076342 commit 89010cc
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 9 deletions.
57 changes: 57 additions & 0 deletions Configure.pir
@@ -0,0 +1,57 @@
#! /usr/local/bin/parrot

.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 HQ9plus.\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('Makefile.in', 'Makefile', config)
# genfile('src/ops/Makefile.in', 'src/ops/Makefile', config)
# genfile('src/pmc/Makefile.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 hq9plus.\n"
print "You may also type '"
print make
print " test' to run the hq9plus 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:

10 changes: 5 additions & 5 deletions build/templates/Makefile.in → Makefile.in
Expand Up @@ -12,9 +12,9 @@ LIB_DIR := @libdir@$(VERSION)
PERL = @perl@
RM_F = @rm_f@
PARROT := $(BIN_DIR)/parrot@exe@
#CONDITIONED_LINE(darwin):
#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

# The default target
default: build
Expand All @@ -35,8 +35,8 @@ help :
@echo " help: Print this help message."

# regenerate the Makefile
Makefile: build/templates/Makefile.in
$(PERL) Configure.pl
Makefile: Makefile.in
$(Parrot) Configure.pir

# Compilation:
build: unl.pbc
Expand Down
1 change: 1 addition & 0 deletions PARROT_REVISION
@@ -0,0 +1 @@
42797
12 changes: 8 additions & 4 deletions README
@@ -1,6 +1,10 @@
# $Id$

See 'perldoc unl.pir' for documentation.

$perl Configure.pl
$make test
Unlambda is a functional programming language.
See http://en.wikipedia.org/wiki/Unlambda for details.

$ parrot Configure.pir
$ make
$ make test

unlambda is hosted at http://github.com/bschmalhofer/unlambda.

0 comments on commit 89010cc

Please sign in to comment.