SOLVED: problem with cons
-> Maps, Models and Mods

#1: SOLVED: problem with cons Author: W1ZrDLocation: Finland PostPosted: Sat Dec 22, 2007 2:09 am
    ----
I've been trying to patch cons up from 2.95 to 3, to 4.1.2 and then compile but I constantly get: Ignoring missing script "Construct" at /usr/bin/cons line 720.

Code::
sub main::doscripts {
    my($script) = @_;
    Build($script);
    # Now set up the includes/excludes (after the Construct file is read).
    $param::include = join('|', @param::include);

    # Save the original variable names from the script package.
    # These will stay intact, but any other "script::" variables
    # defined in a Conscript file will get saved, deleted,
    # and (when necessary) restored.
    my(%orig_script_var) = map {$_ => 1} keys %script::;
    $caller_dir_path = undef;
    my $cwd = Cwd::cwd();
    my(@scripts) = pop(@priv::scripts);
    while ($priv::self = shift(@scripts)) {
	my($path) = $priv::self->{script}->rsrcpath;
	if (-f $path) {
	    $dir::cwd = $priv::self->{script}->{dir};
	    # Handle chdir to the Conscript file directory, if necessary.
	    my ($vol, $dir, $file);
	    if ($param::conscript_chdir) {
		($vol, $dir, $file) = File::Spec->splitpath(File::Spec->canonpath($path));
		if ($vol ne '' || $dir ne '') {
		    $caller_dir_path = File::Spec->catpath($vol, $dir, undef);
		    chdir($caller_dir_path) ||
			die "Could not chdir to $caller_dir_path: $!\n";
		}
	    } else {
		$file = $path;
	    }
	    # Actually process the Conscript file.
	    do $file;
	    # Save any variables defined by the Conscript file
	    # so we can restore them later, if needed;
	    # then delete them from the script:: namespace.
	    my(@del) = grep(! $orig_script_var{$_}, keys %script::);
	    if (@del) {
		$priv::self->{script}->{pkgvars} =
						NameSpace::save('script', @del);
		NameSpace::remove('script', @del);
	    }
	    if ($caller_dir_path) {
		chdir($cwd);
		$caller_dir_path = undef;
	    }
	    if ($@) {
		chomp($@);
		my $err = ($@ =~ /\n/ms) ? ":\n$@" : " ($@)";
		print qq($0: error in file "$path"$err\n);
		$run::errors++;
	    } else {
		# Only process subsidiary scripts if no errors in parent.
		unshift(@scripts, @priv::scripts);
	    }
	    undef @priv::scripts;
	} else {
	    my $where = '';
	    my $cref = $priv::self->{script}->creator;
	    if (defined $cref) {
		my($_foo, $script, $line, $sub) = @$cref;
		$where = " ($sub in $script, line $line)";
	    }
	    warn qq(Ignoring missing script "$path"$where);
	}
    }
    die("$0: script errors encountered: construction aborted\n")
	if $run::errors;
}

[edit: changed it to point to where the current perl version is]



-> Maps, Models and Mods

All times are GMT + 1 Hour

Page 1 of 1