diff options
Diffstat (limited to 'Configure.pl')
-rw-r--r-- | Configure.pl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Configure.pl b/Configure.pl index 29ee0b8..f2a7047 100644 --- a/Configure.pl +++ b/Configure.pl @@ -32,6 +32,7 @@ MAIN: { my %options; GetOptions(\%options, 'help!', 'prefix=s', + 'sysroot=s', 'sdkroot=s', 'backends=s', 'no-clean!', 'gen-nqp:s', 'gen-moar:s', 'make-install!', 'makefile-timing!', @@ -59,9 +60,9 @@ MAIN: { } unless (defined $options{prefix}) { - my $dir = getcwd; - print "ATTENTION: no --prefix supplied, building and installing to $dir/install\n"; - $options{prefix} = 'install'; + my $default = defined($options{sysroot}) ? '/usr' : File::Spec->catdir(getcwd, 'install'); + print "ATTENTION: no --prefix supplied, building and installing to $default\n"; + $options{prefix} = $default; } $options{prefix} = File::Spec->rel2abs($options{prefix}); @@ -148,6 +149,11 @@ MAIN: { } $config{prefix} = $prefix; + $config{sdkroot} = $options{sdkroot}; + $config{sysroot} = $options{sysroot}; + $config{pass_rakudo_config} = ""; + $config{pass_rakudo_config} .= $options{sdkroot} ? " --sdkroot=\"\$(SDKROOT_DIR)\"" : ""; + $config{pass_rakudo_config} .= $options{sysroot} ? " --sysroot=\"\$(SYSROOT_DIR)\"" : ""; $config{slash} = $slash; $config{'makefile-timing'} = $options{'makefile-timing'}; $config{'stagestats'} = '--stagestats' if $options{'makefile-timing'}; @@ -263,6 +269,9 @@ Configure.pl - $lang Configure General Options: --help Show this text --prefix=dir Install files in dir; also look for executables there + --sdkroot=dir When given, use for searching build tools here, e.g. + nqp, java etc. + --sysroot=dir When given, use for searching runtime components here --backends=jvm,moar Which backend(s) to use --gen-moar[=branch] |