Skip to content

Commit

Permalink
Added submodule initialization at startup
Browse files Browse the repository at this point in the history
- Fixed the order of configurations
  • Loading branch information
vrurg committed Apr 6, 2019
1 parent 7960454 commit b619b56
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2,006 deletions.
18 changes: 16 additions & 2 deletions Configure.pl
Expand Up @@ -8,8 +8,22 @@
use Getopt::Long; use Getopt::Long;
use File::Spec; use File::Spec;
use Cwd; use Cwd;
use lib 'tools/lib';
use Data::Dumper; use Data::Dumper;

BEGIN {
print "Updating nqp-configure submodule";
my $msg = qx{git submodule sync --quiet 3rdparty/nqp-configure && git submodule --quiet update --init 3rdparty/nqp-configure 2>&1};
if ($? >> 8 == 0) { print "OK\n" }
else {
if ($msg =~ /[']([^']+)[']\s+already exists and is not an empty/) {
print "\n===SORRY=== ERROR: Cannot update submodule because directory exists and is not empty.\n" .
">>> Please delete the following folder and try again:\n$1\n\n";
exit 1;
}
}
}

use lib qw<tools/lib 3rdparty/nqp-configure/lib>;
use NQP::Config; use NQP::Config;


$| = 1; $| = 1;
Expand Down Expand Up @@ -57,8 +71,8 @@
"===WARNING!===\nErrors are being ignored.\nIn the case of any errors the script may behave unexpectedly.\n"; "===WARNING!===\nErrors are being ignored.\nIn the case of any errors the script may behave unexpectedly.\n";
} }


$cfg->configure_prefix;
$cfg->configure_from_options; $cfg->configure_from_options;
$cfg->configure_prefix;
$cfg->configure_relocatability; $cfg->configure_relocatability;
$cfg->configure_repo_urls; $cfg->configure_repo_urls;
$cfg->configure_commands; $cfg->configure_commands;
Expand Down

0 comments on commit b619b56

Please sign in to comment.