Make old site-specific configuration more generic,

set DIRPROJECT_PERL_BOOT to a script for bin/verilator to call to do setup.
This commit is contained in:
Wilson Snyder 2009-06-21 13:17:12 -04:00
parent 02d162858f
commit 96b23f6edd
4 changed files with 11 additions and 15 deletions

View File

@ -87,6 +87,9 @@ pkgdatadir = @pkgdatadir@
# Directory in which to install data across multiple architectures
datarootdir = @datarootdir@
# Compile options
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
#### End of system configuration section. ####
######################################################################
@ -271,6 +274,10 @@ install-project: dist
rm $(DISTNAME).tgz
install-project-quick:
ifeq ($(CFG_WITH_DEFENV),yes)
@echo "%Error: Reconfigure with './configure --disable-defenv' to avoid hardcoded paths."
false
endif
@echo "Install-project-quick (no strip) to $(DIRPROJECT)"
for p in $(INST_PROJ_FILES) ; do \
$(INST_PROJ_CVS) $$p $(DIRPROJECT)/hw/utils/verilator/$$p; \

View File

@ -18,9 +18,9 @@ eval 'exec perl -wS $0 ${1+"$@"}'
require 5.006_001;
use warnings;
BEGIN {
if (my $Project=($ENV{DIRPROJECT}||$ENV{PROJECT})) {
if ($ENV{DIRPROJECT} && $ENV{DIRPROJECT_PERL_BOOT}) {
# Magic to allow author testing of perl packages in local directory
require "$Project/hw/utils/perltools/boot.pl";
require $ENV{DIRPROJECT}."/".$ENV{DIRPROJECT_PERL_BOOT};
}
}

View File

@ -369,17 +369,6 @@ string V3Options::getenvSYSTEMPERLGuts() {
var = DEFENV_SYSTEMPERL;
setenvStr("SYSTEMPERL", var, "Hardcoded at build time");
}
// Only correct or check it if we really need the value
if (v3Global.opt.usingSystemPerlLibs()) {
if (var == "") {
string testdir = V3Options::getenvW() + "/hw/utils/perltools/SystemC"; // Hack for internal testing
if (V3Options::fileStatDir(testdir)) {
var = testdir;
setenvStr ("SYSTEMPERL", var, "From W");
}
}
// Test for correctness in SYSTEMPERL_INCLUDE
}
return var;
}

View File

@ -4,9 +4,9 @@
require 5.006_001;
BEGIN {
if (my $Project=($ENV{DIRPROJECT}||$ENV{PROJECT})) {
if ($ENV{DIRPROJECT} && $ENV{DIRPROJECT_PERL_BOOT}) {
# Magic to allow author testing of perl packages in local directory
require "$Project/hw/utils/perltools/boot.pl";
require $ENV{DIRPROJECT}."/".$ENV{DIRPROJECT_PERL_BOOT};
}
}