From 96f5f66c26b77a8f1328f1f9fce85c9bc64fe0d8 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 14 Oct 2017 16:01:27 -0400 Subject: [PATCH] Move generated objects into bin/ to match --prefix installations --- MANIFEST.SKIP | 2 ++ Makefile.in | 34 ++++++++++++++++++++------------ examples/hello_world_c/Makefile | 1 + examples/hello_world_sc/Makefile | 1 + examples/tracing_c/Makefile | 1 + examples/tracing_sc/Makefile | 1 + src/Makefile.in | 14 ++++++------- 7 files changed, 34 insertions(+), 20 deletions(-) diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index aef9199c6..43b95e7f3 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -20,6 +20,8 @@ /cov_work/ /logs/ ^Makefile$ +bin/verilator_bin.* +bin/verilator_coverage_bin.* src/Makefile$ src/Makefile_obj$ include/verilated.mk$ diff --git a/Makefile.in b/Makefile.in index 9b1d1a934..09cde0262 100644 --- a/Makefile.in +++ b/Makefile.in @@ -116,7 +116,11 @@ DISTFILES_INC = $(INFOS) .gitignore Artistic COPYING COPYING.LESSER \ *.in *.ac \ Changes TODO \ MANIFEST.SKIP \ - bin/* \ + bin/verilator \ + bin/verilator_coverage \ + bin/verilator_difftree \ + bin/verilator_includer \ + bin/verilator_profcfunc \ doxygen-mainpage doxygen.config veripool-logo.png \ install-sh configure mkinstalldirs *.pod \ include/*.[chv]* \ @@ -156,9 +160,9 @@ INST_PROJ_FILES = \ include/vltstd/*.[chv]* \ INST_PROJ_BIN_FILES = \ - verilator_bin \ - verilator_bin_dbg \ - verilator_coverage_bin_dbg \ + bin/verilator_bin \ + bin/verilator_bin_dbg \ + bin/verilator_coverage_bin_dbg \ DISTFILES := $(DISTFILES_INC) @@ -209,7 +213,7 @@ test_regress: all_nomsg examples: all_nomsg for p in examples/* ; do \ - VERILATOR_ROOT=`pwd` $(MAKE) -C $$p ; \ + $(MAKE) -C $$p VERILATOR_ROOT=`pwd` ; \ done info: $(INFOS) @@ -291,9 +295,9 @@ installbin: ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator ) ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage ) ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc ) - ( $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin ) - ( $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg ) - ( $(INSTALL_PROGRAM) verilator_coverage_bin_dbg $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg ) + ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin ) + ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg ) + ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg ) $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/bin ( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer ) @@ -360,8 +364,8 @@ INST_PROJ_CVS = cp_if_cvs_diff install-project: dist @echo "Install-project to $(DIRPROJECT)" - strip verilator_bin* - strip verilator_coverage_bin* + strip bin/verilator_bin* + strip bin/verilator_coverage_bin* $(MAKE) install-project-quick for p in $(VL_INST_MAN_FILES) ; do \ $(INSTALL_DATA) $$p $(DIRPROJECT_PREFIX)/man/man1/$$p; \ @@ -384,8 +388,8 @@ endif install-cadtools: dist @echo "Install-project to $(CAD_DIR)" - strip verilator_bin* - strip verilator_coverage_bin* + strip bin/verilator_bin* + strip bin/verilator_coverage_bin* $(MAKE) install-cadtools-quick $(SHELL) ${srcdir}/mkinstalldirs $(VERILATOR_CAD_DIR)/man/man1 for p in $(VL_INST_MAN_FILES) ; do \ @@ -428,7 +432,10 @@ cppcheck: $(CPPCHECK_DEP) ftp: info install-msg: - @echo "Installed!" + @echo + @echo "Installed binaries to $(DESTDIR)$(bindir)/verilator" + @echo "Installed man to $(DESTDIR)$(mandir)/man1" + @echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples" @echo @echo "For documentation see 'man verilator' or 'verilator --help'" @echo "For forums and to report bugs see http://www.veripool.org/verilator" @@ -476,6 +483,7 @@ clean mostlyclean distclean maintainer-clean:: distclean maintainer-clean:: rm -f Makefile config.status config.cache config.log TAGS rm -f verilator_bin* verilator_coverage_bin* + rm -f bin/verilator_bin* bin/verilator_coverage_bin* rm -f include/verilated.mk include/verilated_config.h TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \ diff --git a/examples/hello_world_c/Makefile b/examples/hello_world_c/Makefile index 10c79f4f3..605021f15 100644 --- a/examples/hello_world_c/Makefile +++ b/examples/hello_world_c/Makefile @@ -29,6 +29,7 @@ endif ifeq ($(VERILATOR_ROOT),) VERILATOR = verilator else +export VERILATOR_ROOT VERILATOR = $(VERILATOR_ROOT)/bin/verilator endif diff --git a/examples/hello_world_sc/Makefile b/examples/hello_world_sc/Makefile index 6b725bec1..ce3b199b8 100644 --- a/examples/hello_world_sc/Makefile +++ b/examples/hello_world_sc/Makefile @@ -29,6 +29,7 @@ endif ifeq ($(VERILATOR_ROOT),) VERILATOR = verilator else +export VERILATOR_ROOT VERILATOR = $(VERILATOR_ROOT)/bin/verilator endif diff --git a/examples/tracing_c/Makefile b/examples/tracing_c/Makefile index 9fada20f3..7383b7c42 100644 --- a/examples/tracing_c/Makefile +++ b/examples/tracing_c/Makefile @@ -27,6 +27,7 @@ ifeq ($(VERILATOR_ROOT),) VERILATOR = verilator VERILATOR_COVERAGE = verilator_coverage else +export VERILATOR_ROOT VERILATOR = $(VERILATOR_ROOT)/bin/verilator VERILATOR_COVERAGE = $(VERILATOR_ROOT)/bin/verilator_coverage endif diff --git a/examples/tracing_sc/Makefile b/examples/tracing_sc/Makefile index 3c9c68f97..df56150c3 100644 --- a/examples/tracing_sc/Makefile +++ b/examples/tracing_sc/Makefile @@ -27,6 +27,7 @@ ifeq ($(VERILATOR_ROOT),) VERILATOR = verilator VERILATOR_COVERAGE = verilator_coverage else +export VERILATOR_ROOT VERILATOR = $(VERILATOR_ROOT)/bin/verilator VERILATOR_COVERAGE = $(VERILATOR_ROOT)/bin/verilator_coverage endif diff --git a/src/Makefile.in b/src/Makefile.in index 83b37f976..f946d64e8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -48,25 +48,25 @@ obj_dbg: .SUFFIXES: -.PHONY: ../verilator_bin ../verilator_bin_dbg ../verilator_coverage_bin_dbg +.PHONY: ../bin/verilator_bin ../bin/verilator_bin_dbg ../bin/verilator_coverage_bin_dbg -opt: ../verilator_bin +opt: ../bin/verilator_bin ifeq ($(VERILATOR_NO_OPT_BUILD),1) # Faster laptop development... One build -../verilator_bin: ../verilator_bin_dbg +../bin/verilator_bin: ../bin/verilator_bin_dbg -rm -rf $@ $@.exe -cp -p $<$(EXEEXT) $@$(EXEEXT) else -../verilator_bin: obj_opt prefiles +../bin/verilator_bin: obj_opt prefiles cd obj_opt && $(MAKE) -j 1 TGT=../$@ -f ../Makefile_obj serial cd obj_opt && $(MAKE) TGT=../$@ -f ../Makefile_obj endif -dbg: ../verilator_bin_dbg ../verilator_coverage_bin_dbg -../verilator_bin_dbg: obj_dbg prefiles +dbg: ../bin/verilator_bin_dbg ../bin/verilator_coverage_bin_dbg +../bin/verilator_bin_dbg: obj_dbg prefiles cd obj_dbg && $(MAKE) -j 1 TGT=../$@ VL_DEBUG=1 -f ../Makefile_obj serial cd obj_dbg && $(MAKE) TGT=../$@ VL_DEBUG=1 -f ../Makefile_obj -../verilator_coverage_bin_dbg: obj_dbg prefiles +../bin/verilator_coverage_bin_dbg: obj_dbg prefiles cd obj_dbg && $(MAKE) TGT=../$@ VL_DEBUG=1 VL_VLCOV=1 -f ../Makefile_obj serial_vlcov cd obj_dbg && $(MAKE) TGT=../$@ VL_DEBUG=1 VL_VLCOV=1 -f ../Makefile_obj