diff --git a/Makefile.in b/Makefile.in index b03cf9a37..0622509e5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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; \ diff --git a/bin/verilator b/bin/verilator index afecc2a2c..76d5b120a 100755 --- a/bin/verilator +++ b/bin/verilator @@ -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}; } } diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 2f57d1279..bb7589f0a 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -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; } diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 516505251..f1060b065 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -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}; } }