[Box Backup-commit] COMMIT r1786 - box/chris/general/infrastructure

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Wed, 01 Aug 2007 00:52:51 +0100


Author: chris
Date: 2007-08-01 00:52:51 +0100 (Wed, 01 Aug 2007)
New Revision: 1786

Modified:
   box/chris/general/infrastructure/makebuildenv.pl.in
Log:
Quiet make by default (make V=1 to override) (merges [1785])


Modified: box/chris/general/infrastructure/makebuildenv.pl.in
===================================================================
--- box/chris/general/infrastructure/makebuildenv.pl.in	2007-07-31 23:52:26 UTC (rev 1785)
+++ box/chris/general/infrastructure/makebuildenv.pl.in	2007-07-31 23:52:51 UTC (rev 1786)
@@ -544,6 +544,13 @@
 VARIENT = DEBUG
 .endif
 
+HIDE     = \$(if \$(V),,@)
+_CXX     = \$(if \$(V),\$(CXX),     @ echo "[CXX]     \$<" && \$(CXX))
+_LINK    = \$(if \$(V),\$(CXX),     @ echo "[LINK]    \$@" && \$(CXX))
+_WINDRES = \$(if \$(V),\$(WINDRES), @ echo "[WINDRES] \$<" && \$(WINDRES))
+_AR      = \$(if \$(V),\$(AR),      @ echo "[AR]      \$@" && \$(AR))
+_RANLIB  = \$(if \$(V),\$(RANLIB),  @ echo "[RANLIB]  \$@" && \$(RANLIB))
+
 __E
 	
 	# read directory
@@ -646,12 +653,12 @@
 
 		if ($is_cpp)
 		{
-			$make .= "\t\$(CXX) \$(CXXFLAGS) $compile_line_extra ".
+			$make .= "\t\$(_CXX) \$(CXXFLAGS) $compile_line_extra ".
 				"-c $file -o $out_name\n\n";
 		}
 		elsif ($is_rc)
 		{
-			$make .= "\t\$(WINDRES) $file $out_name\n\n";
+			$make .= "\t\$(_WINDRES) $file $out_name\n\n";
 			my $res_list = $module_resources_win32{$mod};
 			$res_list ||= [];
 			push @$res_list, $base.'.o';
@@ -690,7 +697,7 @@
 		# run make for things we require
 		for my $dep (@all_deps_for_module)
 		{
-			$deps_makeinfo .= "\t\t(cd ../../$dep; \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
+			$deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
 		}
 		$deps_makeinfo .= ".\tendif\n.endif\n\n";
 	}
@@ -734,9 +741,9 @@
 	if($target_is_library)
 	{
 		# make a library archive...
-		print MAKE "\t(echo -n > $end_target; rm $end_target)\n";
-		print MAKE "\t\$(AR) -q $end_target $o_file_list\n";
-		print MAKE "\t\$(RANLIB) $end_target\n";
+		print MAKE "\t\$(HIDE) (echo -n > $end_target; rm $end_target)\n";
+		print MAKE "\t\$(_AR) -q $end_target $o_file_list\n";
+		print MAKE "\t\$(_RANLIB) $end_target\n";
 	}
 	else
 	{
@@ -760,7 +767,7 @@
 		}
 	
 		# link line...
-		print MAKE "\t\$(CXX) $link_line_extra -o $end_target $o_file_list $lib_files$lo $platform_lib_files\n";
+		print MAKE "\t\$(_LINK) $link_line_extra -o $end_target $o_file_list $lib_files$lo $platform_lib_files\n";
 	}
 	# tests need to copy the test file over
 	if($type eq 'test')
@@ -781,7 +788,7 @@
 	print MAKE "clean:\n\t-rm -rf \$(OUTDIR)/*\n.\tifndef SUBCLEAN\n";
 	for my $dep (@all_deps_for_module)
 	{
-		print MAKE "\t(cd ../../$dep; \$(MAKE) \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n";
+		print MAKE "\t\$(HIDE) (cd ../../$dep; \$(MAKE) \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n";
 	}
 	print MAKE ".\tendif\n";