Re: make -s

2008-01-16 Thread Bob Rossi
On Mon, Jan 14, 2008 at 11:06:00PM +0100, Ralf Wildenhues wrote:
 * Peter O'Gorman wrote on Mon, Jan 14, 2008 at 11:00:35PM CET:
  Ralf Wildenhues wrote:
   
   Since repeatedly nobody stepped forward to do this, I wrote that patch
   myself now.  OK to apply to HEAD?
  
  Yes. Thank you.
 
 Done, thanks!

Thank you Ralf. I owe you one.

Bob Rossi




Re: make -s

2008-01-14 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Thu, Jan 10, 2008 at 08:29:33AM CET:
 
 For whatever output is left done by libtool I expect that whoever want's
 it silenced hard enough will have enough motivation to send a patch to
 libtool-patches@gnu.org.

Since repeatedly nobody stepped forward to do this, I wrote that patch
myself now.  OK to apply to HEAD?

Cheers,
Ralf

2008-01-14  Ralf Wildenhues  [EMAIL PROTECTED]

Silence all non-warning output from `libtool --silent'.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms)
(func_extract_archives, func_mode_link): Use func_verbose
instead of func_echo for all non-warning output.

Index: libltdl/config/ltmain.m4sh
===
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.95
diff -u -r1.95 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  12 Jan 2008 13:58:14 -  1.95
+++ libltdl/config/ltmain.m4sh  14 Jan 2008 21:19:24 -
@@ -879,7 +879,7 @@
func_show_eval $RM $nlist ${nlist}S ${nlist}T
 
# Parse the name list into a source file.
-   func_echo creating $output_objdir/$my_dlsyms
+   func_verbose creating $output_objdir/$my_dlsyms
 
$opt_dry_run || $ECHO  $output_objdir/$my_dlsyms \
 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. 
*/
@@ -893,14 +893,14 @@
 
 
if test $dlself = yes; then
- func_echo generating symbol list for \`$output'
+ func_verbose generating symbol list for \`$output'
 
  $opt_dry_run || echo ': @PROGRAM@ '  $nlist
 
  # Add our own program objects to the symbol list.
  progfiles=`$ECHO X$objs$old_deplibs | $SP2NL | $Xsed -e $lo2o | 
$NL2SP`
  for progfile in $progfiles; do
-   func_echo extracting global C symbols from \`$progfile'
+   func_verbose extracting global C symbols from \`$progfile'
$opt_dry_run || eval $NM $progfile | $global_symbol_pipe  
'$nlist'
  done
 
@@ -947,7 +947,7 @@
fi
 
for dlprefile in $dlprefiles; do
- func_echo extracting global C symbols from \`$dlprefile'
+ func_verbose extracting global C symbols from \`$dlprefile'
  func_basename $dlprefile
  name=$func_basename_result
  $opt_dry_run || {
@@ -1159,7 +1159,7 @@
 
   case $host in
   *-darwin*)
-   func_echo Extracting $my_xabs
+   func_verbose Extracting $my_xabs
# Do not bother doing anything if just a dry run
$opt_dry_run || {
  darwin_orig_dir=`pwd`
@@ -1171,7 +1171,7 @@
  if test -n $darwin_arches; then
darwin_arches=`$ECHO $darwin_arches | $SED -e 's/.*are://'`
darwin_arch=
-   func_echo $darwin_base_archive has multiple architectures 
$darwin_arches
+   func_verbose $darwin_base_archive has multiple architectures 
$darwin_arches
for darwin_arch in  $darwin_arches ; do
  func_mkdir_p unfat-$$/${darwin_base_archive}-${darwin_arch}
  lipo -thin $darwin_arch -output 
unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive} 
${darwin_archive}
@@ -4655,13 +4655,13 @@
# If the library has no export list, then create one now
if test -f $output_objdir/$soname-def; then :
else
- func_echo extracting exported symbol list from \`$soname'
+ func_verbose extracting exported symbol list from \`$soname'
  func_execute_cmds $extract_expsyms_cmds 'exit $?'
fi
 
# Create $newlib
if test -f $output_objdir/$newlib; then :; else
- func_echo generating import library for \`$soname'
+ func_verbose generating import library for \`$soname'
  func_execute_cmds $old_archive_from_expsyms_cmds 'exit $?'
fi
# make sure the library variables are pointing to the new library
@@ -5982,7 +5982,7 @@
# Prepare the list of exported symbols
if test -z $export_symbols; then
  if test $always_export_symbols = yes || test -n 
$export_symbols_regex; then
-   func_echo generating symbol list for \`$libname.la'
+   func_verbose generating symbol list for \`$libname.la'
export_symbols=$output_objdir/$libname.exp
$opt_dry_run || $RM $export_symbols
cmds=$export_symbols_cmds
@@ -5996,7 +5996,7 @@
skipped_export=false
  else
# The command line is too long to execute in one step.
-   func_echo using reloadable object file for export list...
+   func_verbose using reloadable object file for export list...
skipped_export=:
# Break out early, otherwise skipped_export may be
# set to false by a later but shorter cmd.
@@ -6019,7 +6019,7 @@
 
if test X$skipped_export != X:  test -n 

Re: make -s

2008-01-14 Thread Peter O'Gorman
Ralf Wildenhues wrote:
 * Ralf Wildenhues wrote on Thu, Jan 10, 2008 at 08:29:33AM CET:
 For whatever output is left done by libtool I expect that whoever want's
 it silenced hard enough will have enough motivation to send a patch to
 libtool-patches@gnu.org.
 
 Since repeatedly nobody stepped forward to do this, I wrote that patch
 myself now.  OK to apply to HEAD?
 

Yes. Thank you.

Peter
-- 
Peter O'Gorman
http://pogma.com




Re: make -s

2008-01-10 Thread Richard Hacker
On Thursday 10 January 2008 08:29, Ralf Wildenhues wrote:
 For whatever output is left done by libtool I expect that whoever want's
 it silenced hard enough will have enough motivation to send a patch to
 libtool-patches@gnu.org.
That shouldn't bee too difficult.

As a hint, make adds 's' to the environment variable MAKEFLAGS:
MAKEFLAGS=s

MFLAGS=-s also exists, but its use seems to be superceded by MAKEFLAGS

When I change ltmain.sh using the following patch, it seems to work. I am 
using
# libtool --version
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)

I hope this patch is portable I am certainly no expert in portability!

 patch start 
--- old/ltmain.sh   2006-11-25 12:34:55.0 +0100
+++ /usr/share/libtool/ltmain.sh2008-01-10 13:28:59.0 +0100
@@ -384,6 +384,15 @@
 done
 func_extract_archives_result=$my_oldobjs
 }
+
+func_is_make_silent ()
+{
+case $1 in
+*s*) true;;
+*) false;;
+esac
+}
+
 # End of Shell function definitions
 #

@@ -392,6 +401,12 @@

 disable_libs=no

+if func_is_make_silent $MAKEFLAGS
+then
+   show=:
+   preserve_args=$preserve_args $arg
+fi
+
 # Parse our command line options once, thoroughly.
 while test $# -gt 0
 do
 patch end 

- Richard




Re: make -s

2008-01-10 Thread Bob Rossi
On Thu, Jan 10, 2008 at 04:15:12PM -0500, Mike Frysinger wrote:
 On Thursday 10 January 2008, Ralf Wildenhues wrote:
  * Mike Frysinger wrote on Thu, Jan 10, 2008 at 08:58:09PM CET:
   On Thursday 10 January 2008, Ralf Wildenhues wrote:
What I meant was: even with
  make -s LIBTOOLFLAGS=--silent
   
there will be some leftover output done by libtool.  If somebody wants
to fix that, be invited to provide a (complete) patch (best including
testsuite amend; the stresstest in Libtool HEAD would probably come in
handy).
   
If you want all tools silenced which are called by make, then I suggest
to simply use
  make /dev/null || make
  
   well, we're after the automatic output going away, not intended output.
 
  So what's intended output?  That by make, libtool is apparently not.
  What about makeinfo, texi2dvi, dvips?  autoconf/aclocal/automake reruns,
  configure reruns?  Are you suggesting each of them parse $MAKEFLAGS and
  go silent with that, too?
 
  libtool need not be invoked by make alone.  There are multitudinous
  other build systems, some of which call libtool at times.  Should
  libtool parse their $TOOLFLAGS too?
 
  I merely think that MAKEFLAGS is for make, and other flags should be for
  other programs.  And hey, that's just my personal opinion, not cast in
  stone or anything; but I would like to be shown why another choice is
  better.
 
 i think we're focusing on the big offenders here.  libtool is certainly 
 much 
 more prevalent than any other tool cited here when combined with autotools.  
 taking that into consideration, the fact that libtool outputs status 
 information that amounts pretty closely (almost exactly) to what make itself 
 would output, the idea of having it be autosilenced according to -s is a 
 common (and logical) expectation for people.  i'm not saying this is grounds 
 for this must be done!, just putting it out there.

Exactly, I would think most people would not expect the current
behavior. I would say Hey, I told make to be quit, but it's not.

Ingorance is bliss.

Bob Rossi




Re: make -s

2008-01-10 Thread Bob Friesenhahn

On Thu, 10 Jan 2008, Bob Rossi wrote:

Well, I might be over simplifying things because I don't understand the
big picture. When I type 'make -s' I assume that the compiler commands
that make kicks off will not be sent to stdout/stderr. I do expect that
if the user has some stuff in the Makefile that prints to stdout/stderr
that it would show up there.


Yes, all 'make -s' is supposed to do is to cause make not to provide 
information about what it is doing.  It should not influence anything 
else.


The only contract that libtool should offer is that if --silent is 
supplied, it should similarly not provide information about what it is 
doing.  It should only provide information about what has gone wrong. 
Unfortunately, sometimes it is very difficult to decipher an error 
message unless you know the precise action which was being performed.


The automake project would be a better place to add extra smarts for a 
more silent build when using libtool.


Bob
==
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/