From 422d5ee2acdeb1e2c932207ebc30f207d40496d6 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Wed, 20 Mar 2019 17:32:29 -0500 Subject: [PATCH 1/2] #741 add VERBOSE synonym --- bin/trick-CP | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/trick-CP b/bin/trick-CP index 4ede38f2..3cfc53bc 100755 --- a/bin/trick-CP +++ b/bin/trick-CP @@ -12,6 +12,11 @@ use Pod::Text ; $trick_bin = dirname(abs_path($0)) ; $trick_home = dirname($trick_bin) ; +### Set TRICK_VERBOSE_BUILD if VERBOSE is defined (synonyms) ### +if(defined $ENV{'VERBOSE'}) { + $ENV{'TRICK_VERBOSE_BUILD'} = 1; +} + #### Handle arguments #### $numArgs = $#ARGV + 1; $makefileAddArgs = ' '; From 644a9a0e00f2ae62b521da6f52e5c862ae2cfff0 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Thu, 21 Mar 2019 09:28:52 -0500 Subject: [PATCH 2/2] #741 add VERBOSE synonym everywhere --- bin/trick-CP | 2 +- libexec/trick/make_makefile_src | 6 +++++- libexec/trick/make_makefile_swig | 6 +++++- share/trick/makefiles/Makefile.common | 4 ++++ trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/trick-CP b/bin/trick-CP index 3cfc53bc..e3fe0753 100755 --- a/bin/trick-CP +++ b/bin/trick-CP @@ -242,7 +242,7 @@ print-%: help: @echo -e "\ Simulation make options:\n\ - make [debug] [TRICK_VERBOSE_BUILD=1] - Makes everything: S_main and S_sie.resource\n\ + make [debug] [TRICK_VERBOSE_BUILD=1] [VERBOSE=1] - Makes everything: S_main and S_sie.resource\n\ make sie - Builds the S_sie.resource file.\n\ make clean - Removes all object files in simulation directory\n\ make spotless - Performs a clean\n\ diff --git a/libexec/trick/make_makefile_src b/libexec/trick/make_makefile_src index 8e17aedf..7394166f 100755 --- a/libexec/trick/make_makefile_src +++ b/libexec/trick/make_makefile_src @@ -57,7 +57,7 @@ sub read_lib_deps($@) { read_lib_deps($indent + 1 , @resolved_files) ; } } - } elsif ( exists $ENV{TRICK_VERBOSE_BUILD} ) { + } elsif ( exists( $ENV{TRICK_VERBOSE_BUILD} ) or exists( $ENV{VERBOSE} ) ) { print "Skipping Previously processed file \"$l\"\n" ; } } @@ -214,6 +214,10 @@ print MAKEFILE # ################################################################################ +ifdef VERBOSE + TRICK_VERBOSE_BUILD=1 +endif + ifndef TRICK_VERBOSE_BUILD PRINT_COMPILE = \$(info \$(call COLOR,Compiling) \$<) PRINT_EXE_LINK = \$(info \$(call COLOR,Linking) \$@) diff --git a/libexec/trick/make_makefile_swig b/libexec/trick/make_makefile_swig index 364d9d40..b4ae0e79 100755 --- a/libexec/trick/make_makefile_swig +++ b/libexec/trick/make_makefile_swig @@ -18,7 +18,7 @@ my @ext_lib_paths ; my @files_to_process ; my @ext_lib_files ; my %md5s ; -my $verbose_build = exists($ENV{'TRICK_VERBOSE_BUILD'}) ; +my $verbose_build = (exists($ENV{'TRICK_VERBOSE_BUILD'}) or exists($ENV{'VERBOSE'})); sub get_paths { my @paths = split /:/ , $ENV{$_[0]} ; @@ -177,6 +177,10 @@ else TRICK_SYSTEM_SWIG_CFLAGS += -Wno-unused-but-set-variable endif +ifdef VERBOSE + TRICK_VERBOSE_BUILD=1 +endif + ifndef TRICK_VERBOSE_BUILD PRINT_SWIG = \$(info \$(call COLOR,SWIGing) \$<) PRINT_COMPILE_SWIG = \$(info \$(call COLOR,Compiling) \$<) diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 94dfcc42..5c763ecd 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -9,6 +9,10 @@ export TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../..) COLOR = $(1) +ifdef VERBOSE + TRICK_VERBOSE_BUILD=1 +endif + ifndef TRICK_VERBOSE_BUILD ECHO_CMD = @ endif diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh index dc7c09cf..ba34bda0 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.hh @@ -63,7 +63,7 @@ class PrintAttributes { protected: - const bool verboseBuild = getenv("TRICK_VERBOSE_BUILD"); + const bool verboseBuild = (getenv("TRICK_VERBOSE_BUILD") || getenv("VERBOSE")); const std::string skipping = color(SKIP, "ICG Skip "); /** Directory to put class and enum map files */