Use EXEEXT to fix make warning

This commit is contained in:
Wilson Snyder 2011-10-05 17:07:10 -04:00
parent 6fc0e5167b
commit b03d61e2cf
5 changed files with 23 additions and 11 deletions

View File

@ -7,11 +7,11 @@ indicates the contributor was also the author of the fix; Thanks!
*** Support $ceil, $floor, etc. [Alex Solomatnikov]
*** Fix --help output to go to stderr, not stdout, bug397. [R. Diez]
*** Fix --help output to go to stderr, not stdout, bug397. [Ruben Diez]
**** Fix MSVC compile warning with trunc/round, bug394. [Amir Gonnen]
**** Fix autoconf warnings, bug396. [R. Diez]
**** Fix autoconf and Makefile warnings, bug396. [Ruben Diez]
* Verilator 3.821 2011/09/14

View File

@ -70,7 +70,7 @@ if (! GetOptions (
# "version!" => \&version, # Also passthru'ed
# Switches
"gdb=s" => \$opt_gdb, # Undocumented debugging
"gdbbt!" => \$opt_gdbbt, # Undocumented debugging
"gdbbt!" => \$opt_gdbbt,
# Additional parameters
"<>" => sub {}, # Ignored
)) {
@ -125,7 +125,14 @@ sub verilator_bin {
$bin = "$dir/$basename"; # From pointing to kit directory
}
} else {
$bin = $basename;
if (-x "$RealBin/$basename") {
$bin = "$RealBin/$basename"; # From path/to/verilator with verilator_bin installed
} else {
$bin = $basename; # Find in PATH
}
# Note we don't look under bin/$basename which would be right if running
# in the kit dir. Running that would likely break, since
# VERILATOR_ROOT wouldn't be set and Verilator won't find internal files.
}
return $bin;
}

View File

@ -33,12 +33,14 @@ sub test {
$ENV{VERILATOR_NO_OPT_BUILD} = 1; # Don't build optimized executables; just slows this down
run("make distclean") if -r "Makefile";
my $stage = $ENV{VERILATOR_INSTALL_TEST_STAGE}||0; # For debugging this process
# Try building from a scratch area
my $srcdir = getcwd();
my $blddir = $srcdir."/test_regress/obj_dir/install_test_bld";
my $prefix = $srcdir."/test_regress/obj_dir/install_test_prefix";
my $testdir = $srcdir."/test_regress/obj_dir/install_test_test";
if (1) {
if ($stage <= 0) {
run("/bin/rm -rf $blddir");
run("/bin/mkdir -p $blddir");
run("cd $blddir && $srcdir/configure --prefix $prefix");
@ -46,14 +48,14 @@ sub test {
}
# Install it under the prefix
if (1) {
if ($stage <= 1) {
run("/bin/rm -rf $prefix");
run("/bin/mkdir -p $prefix");
run("cd $blddir && make install");
}
# Run a test using just the path
if (1) {
if ($stage <= 2) {
run("/bin/rm -rf $testdir");
run("/bin/mkdir -p $testdir");
my $bin1 = $prefix."/bin";

View File

@ -24,6 +24,7 @@
srcdir = @srcdir@
VPATH = @srcdir@
PERL = @PERL@
EXEEXT = @EXEEXT@
#### End of system configuration section. ####
@ -65,8 +66,7 @@ opt: ../verilator_bin
ifeq ($(VERILATOR_NO_OPT_BUILD),1) # Faster laptop development... One build
../verilator_bin: ../verilator_bin_dbg
-rm -rf $@ $@.exe
-cp -p $< $@
-cp -p $<.exe $@.exe
-cp -p $<$(EXEEXT) $@$(EXEEXT)
else
../verilator_bin: obj_opt prefiles
cd obj_opt && $(MAKE) -j 1 TGT=../$@ -f ../Makefile_obj serial

View File

@ -60,6 +60,7 @@ pkgdatadir = @pkgdatadir@
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
CPPFLAGS += @CPPFLAGS@
LDFLAGS += @LDFLAGS@
EXEEXT = @EXEEXT@
#### End of system configuration section. ####
@ -140,6 +141,7 @@ clean mostlyclean distclean maintainer-clean::
distclean maintainer-clean:: clean
maintainer-clean::
-rm -f config_rev.h
maintainer-copy::
@ -251,8 +253,9 @@ $(TGT): V3Ast__gen_classes.h $(OBJS)
@echo " Linking $@..."
-rm -rf $@ $@.exe
${LINK} ${LDFLAGS} -o $@ $(OBJS) $(CCMALLOC) ${LIBS}
@-(cp $@.exe $@ || true)
# ok if cp failes on linux, it's there to insure executable works on NT
ifneq ($(EXEEXT),)
cp $@$(EXEEXT) $@
endif
V3Number_test: V3Number_test.o
${LINK} ${LDFLAGS} -o $@ $^ ${LIBS}