From 0d7d6a9d0909f014e7557b84b2115ca6ff387bf9 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 4 Apr 2016 15:37:33 +0100 Subject: Pass INSPIRCD_VERBOSE through the environment to unit-cc. --- make/calcdep.pl | 10 +++++----- make/template/main.mk | 7 ++----- make/unit-cc.pl | 3 +-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/make/calcdep.pl b/make/calcdep.pl index f8f50497e..882e75f22 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -120,7 +120,7 @@ END print MAKE < + @\$(SOURCEPATH)/make/unit-cc.pl core-ld \$\@ \$^ \$> inspircd: bin/inspircd @@ -164,10 +164,10 @@ END print MAKE < + \@\$(SOURCEPATH)/make/unit-cc.pl gen-ld \$\@ \$^ \$> bin/inspircd: obj/ld-extra.cmd $core_mk - \@\$(SOURCEPATH)/make/unit-cc.pl static-ld\$(VERBOSE) \$\@ \$^ \$> + \@\$(SOURCEPATH)/make/unit-cc.pl static-ld \$\@ \$^ \$> inspircd: bin/inspircd @@ -231,7 +231,7 @@ sub dep_cpp($$$) { gendep $file; print MAKE "$out: $file $f2dep{$file}\n"; - print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl $type\$(VERBOSE) \$\@ \$(SOURCEPATH)/src/$file \$>\n"; + print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl $type \$\@ \$(SOURCEPATH)/src/$file \$>\n"; } sub dep_so($) { @@ -256,7 +256,7 @@ sub dep_dir($$) { if (@ofiles) { my $ofiles = join ' ', @ofiles; print MAKE "$outdir.so: $ofiles\n"; - print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n"; + print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n"; return 1; } else { return 0; diff --git a/make/template/main.mk b/make/template/main.mk index bc854630a..bff065736 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -114,12 +114,9 @@ FOOTER = finishmessage @TARGET GNU_MAKE SOURCEPATH = $(shell /bin/pwd) @TARGET BSD_MAKE SOURCEPATH != /bin/pwd -@IFDEF INSPIRCD_VERBOSE - VERBOSE = -v -@ELSE +@IFNDEF INSPIRCD_VERBOSE @TARGET GNU_MAKE MAKEFLAGS += --silent @TARGET BSD_MAKE MAKE += -s - VERBOSE = @ENDIF @IFDEF INSPIRCD_STATIC @@ -130,7 +127,7 @@ FOOTER = finishmessage # things like -Wfatal-errors if they wish to. CORECXXFLAGS += $(CXXFLAGS) -@DO_EXPORT CXX CORECXXFLAGS LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORELDFLAGS +@DO_EXPORT CXX CORECXXFLAGS LDLIBS PICLDFLAGS INSPIRCD_VERBOSE SOCKETENGINE CORELDFLAGS @DO_EXPORT SOURCEPATH BUILDPATH INSPIRCD_STATIC # Default target diff --git a/make/unit-cc.pl b/make/unit-cc.pl index aba14a0bc..a06d7b10f 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -36,7 +36,6 @@ chdir $ENV{BUILDPATH}; my $type = shift; my $out = shift; -my $verbose = ($type =~ s/-v$//); our %config = read_configure_cache(); @@ -61,7 +60,7 @@ exit 1; sub message($$$) { my ($type, $file, $command) = @_; - if ($verbose) { + if ($ENV{INSPIRCD_VERBOSE}) { print "$command\n"; } else { print_format "\t<|GREEN $type:|>\t\t$file\n"; -- cgit v1.2.3