Fix make uninstall, bug216
This commit is contained in:
parent
6cfc5798b0
commit
0e8772290d
4
Changes
4
Changes
|
|
@ -3,6 +3,10 @@ Revision history for Verilator
|
||||||
The contributors that suggested a given feature are shown in []. [by ...]
|
The contributors that suggested a given feature are shown in []. [by ...]
|
||||||
indicates the contributor was also the author of the fix; Thanks!
|
indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
|
* Verilator 3.80***
|
||||||
|
|
||||||
|
**** Fix make uninstall, bug216. [Iztok Jeras]
|
||||||
|
|
||||||
* Verilator 3.800 2010/02/07
|
* Verilator 3.800 2010/02/07
|
||||||
|
|
||||||
Application visible changes:
|
Application visible changes:
|
||||||
|
|
|
||||||
60
Makefile.in
60
Makefile.in
|
|
@ -145,8 +145,6 @@ INST_PROJ_BIN_FILES = \
|
||||||
|
|
||||||
DISTFILES := $(DISTFILES_INC)
|
DISTFILES := $(DISTFILES_INC)
|
||||||
|
|
||||||
VL_INST_MAN_FILES = verilator.1
|
|
||||||
|
|
||||||
ifeq ($(OBJCACHE_JOBS),)
|
ifeq ($(OBJCACHE_JOBS),)
|
||||||
ifneq ($(OBJCACHE_HOSTS),)
|
ifneq ($(OBJCACHE_HOSTS),)
|
||||||
export OBJCACHE_JOBS := -j $(shell objcache --jobs "$(OBJCACHE_HOSTS)")
|
export OBJCACHE_JOBS := -j $(shell objcache --jobs "$(OBJCACHE_HOSTS)")
|
||||||
|
|
@ -238,11 +236,25 @@ internals.txt: internals.pod
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
$(POD2TEXT) --loose $< > $@
|
$(POD2TEXT) --loose $< > $@
|
||||||
|
|
||||||
# See uninstall also
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||||
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg \
|
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg \
|
||||||
verilator_includer verilator_profcfunc
|
verilator_includer verilator_profcfunc
|
||||||
# Some scripts go into both the search path and pkgdatadir,
|
# Some scripts go into both the search path and pkgdatadir,
|
||||||
# so they can be found by the user, and under $VERILATOR_ROOT.
|
# so they can be found by the user, and under $VERILATOR_ROOT.
|
||||||
|
|
||||||
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||||
|
VL_INST_MAN_FILES = verilator.1
|
||||||
|
|
||||||
|
VL_INST_INC_FILES = \
|
||||||
|
include/*.[chv]* include/verilated.mk \
|
||||||
|
include/vltstd/*.[chv]* \
|
||||||
|
|
||||||
|
VL_INST_DATA_FILES = \
|
||||||
|
test_v/*.[chv]* \
|
||||||
|
test_c/*.[chv]* test_c/Makefile test_c/Makefile_obj \
|
||||||
|
test_sc/*.[chv]* test_sc/Makefile test_sc/Makefile_obj \
|
||||||
|
test_sp/*.[chv]* test_sp/Makefile test_sp/Makefile_obj \
|
||||||
|
|
||||||
installbin:
|
installbin:
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
|
||||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
|
||||||
|
|
@ -259,16 +271,35 @@ installman: $(VL_INST_MAN_FILES)
|
||||||
done
|
done
|
||||||
|
|
||||||
installdata:
|
installdata:
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include/vltstd $(DESTDIR)$(pkgdatadir)/examples
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/include/vltstd
|
||||||
cp -r include/*.* $(DESTDIR)$(pkgdatadir)/include
|
for p in $(VL_INST_INC_FILES) ; do \
|
||||||
cp -r ${srcdir}/include/*.* $(DESTDIR)$(pkgdatadir)/include
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||||
cp -r ${srcdir}/include/vltstd/*.* $(DESTDIR)$(pkgdatadir)/include/vltstd
|
done
|
||||||
cp -r ${srcdir}/test_c $(DESTDIR)$(pkgdatadir)/examples
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/test_c
|
||||||
cp -r ${srcdir}/test_sc $(DESTDIR)$(pkgdatadir)/examples
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/test_sc
|
||||||
cp -r ${srcdir}/test_sp $(DESTDIR)$(pkgdatadir)/examples
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/test_sp
|
||||||
cp -r ${srcdir}/test_v $(DESTDIR)$(pkgdatadir)/examples
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples/test_v
|
||||||
|
for p in $(VL_INST_DATA_FILES) ; do \
|
||||||
|
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/examples/$$p; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
|
||||||
|
uninstall:
|
||||||
|
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
|
||||||
|
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_BIN_FILES)
|
||||||
|
-cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
||||||
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_FILES)
|
||||||
|
-cd $(DESTDIR)$(pkgdatadir)/examples && rm -f $(VL_INST_DATA_FILES)
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/bin
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/include
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_c
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_sc
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_sp
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_v
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)
|
||||||
|
|
||||||
VL_INST_DATA_FILES = verilator.1
|
|
||||||
install: all_nomsg installbin installman installdata install-msg
|
install: all_nomsg installbin installman installdata install-msg
|
||||||
|
|
||||||
install-here: installman ftp
|
install-here: installman ftp
|
||||||
|
|
@ -313,11 +344,6 @@ install-msg:
|
||||||
@echo "See 'verilator.txt' for documentation."
|
@echo "See 'verilator.txt' for documentation."
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
uninstall:
|
|
||||||
-cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
|
||||||
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
|
|
||||||
-rm -f $(DESTDIR)$(pkgdatadir)
|
|
||||||
|
|
||||||
# autoheader might not change config_build.h.in, so touch a stamp file.
|
# autoheader might not change config_build.h.in, so touch a stamp file.
|
||||||
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \
|
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \
|
||||||
*.in */*.in */*.in
|
*.in */*.in */*.in
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2010 by Wilson Snyder. This program is free software; you can
|
||||||
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
|
||||||
|
my $root = "..";
|
||||||
|
my $Debug;
|
||||||
|
|
||||||
|
if (!-r "$root/.git") {
|
||||||
|
$Self->skip("Not in a git repository");
|
||||||
|
} else {
|
||||||
|
my $cwd = getcwd();
|
||||||
|
my $destdir = "$cwd/".$Self->{obj_dir};
|
||||||
|
# Start clean
|
||||||
|
$Self->_run(cmd=>["rm -rf $destdir && mkdir -p $destdir"],
|
||||||
|
check_finished=>0);
|
||||||
|
# Install into temp area
|
||||||
|
print "Install...\n";
|
||||||
|
$Self->_run (cmd=>["cd $root && make DESTDIR=$destdir install"],
|
||||||
|
check_finished=>0);
|
||||||
|
|
||||||
|
# Check we can run a test
|
||||||
|
# Unfortunately the prefix was hardcoded in the exec at a different place,
|
||||||
|
# so we can't do much here.
|
||||||
|
#print "Check install...\n";
|
||||||
|
|
||||||
|
# Uninstall
|
||||||
|
print "Uninstall...\n";
|
||||||
|
$Self->_run (cmd=>["cd $root && make DESTDIR=$destdir uninstall"],
|
||||||
|
check_finished=>0);
|
||||||
|
|
||||||
|
# Check empty
|
||||||
|
my @files;
|
||||||
|
$finds = `find $destdir -type f -print`;
|
||||||
|
foreach my $f (split /\n/, $finds) {
|
||||||
|
print "\tLEFT: $f\n";
|
||||||
|
$f =~ s!^$cwd!.!;
|
||||||
|
push @files, $f;
|
||||||
|
}
|
||||||
|
if ($#files >= 0) {
|
||||||
|
$Self->error("Uninstall missed files: ",join(' ',@files));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
||||||
Loading…
Reference in New Issue