libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make -s


From: Ralf Wildenhues
Subject: Re: make -s
Date: Mon, 14 Jan 2008 19:18:27 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* Richard Hacker wrote on Mon, Jan 14, 2008 at 10:24:12AM CET:
> On Sunday 13 January 2008 17:46, Ralf Wildenhues wrote:
> > * Richard Hacker wrote on Fri, Jan 11, 2008 at 01:21:50PM CET:
> 
> > > However, libtool is responsible for parsing *make's *FLAGS
> >
> > Now, this contradicts your statement (*) above, no?
> Oppps, my mistake. Sorry for confusing everyone :-(
> No, as you correctly read and interpreted, I meant to say that libtool should 
> NOT parse their caller's *FLAGS. The caller (i.e. automake in this case) 
> should be responsible for calling its subcommands with their respective 
> silent flags set as far as they exist. Think of the case when a new supermake 
> enters the scene and the authors of all the various tools that it calls have 
> to implement yet another SUPERMAKEFLAGS. 
> This concept does not scale well.

Good.  So we're in violent agreement here.

[... putting the silencing code in automake ...]
> >  also carries the burden of larger
> > Makefiles, likely even more verbose output when `make' is issued without
> > `-s'.
> Why should the output of a make without '-s' be larger? I do not see this 
> necessity.

Then I welcome you to write a patch for Automake implementing this, or
even just one that shows how it would work in the Makefile.  I would be
very thankful indeed.  What I've been able to come up with is something
like

am__lt_silent = `for f in $$MAKEFLAGS; do case $$f in *=* | --[!s]*);; \
  *s*) echo --silent;; esac done`
LIBTOOL = $(SHELL) $(top_builddir)/libtool $(am__lt_silent)

but that
- generates even more visual clutter if *not* doing `make -s',
- and spawns another subshell upon each libtool invocation.
  Granted, this could be eliminated like this

am__lt_silent = for f in $$MAKEFLAGS; do case $$f in *=* | --[!s]*) silent=;; \
  *s*) silent=--silent;; esac done;
LIBTOOL = $(am__lt_silent) $(SHELL) $(top_builddir)/libtool $$silent

but wow, look at how ugly your typical non-silent make command output
has become at this point.

> > The problem of implementing the required logic in a Makefile is that,
> > while it is quite cheap to do with GNU make, I only see ugly solutions
> > that work with portable make.  They either
> > - require the choice of silency to be made at configure time already,
> Poor IMHO. make's "-s" switch is dynamic in nature and this spirit should be 
> kept with a "silent" or "not silent" implementation is planned

Agreed.

> > If someone sees a way to avoid these, I'd love to hear about it.
> There should be some <if make_is_silent; AM_LIBTOOLFLAGS += --silent; endif> 
> construct inside Makefile.in. However, I have not seen any if...endif 
> constructs in Makefile.in as a starting point for writing portable make 
> commands.

Well, because portably-wise, such a construct does not exist to my
knowledge.  Some of the older make's don't have conditionals, and for
the newer, at least two different syntax forms exist.  That's one reason
why the whole `configure' thingy came to be in the first place.

My point the whole time is: it is not possible to fix this nicely in
Automake.  Fixing this uglily in Libtool is, well, ugly.  On the other
hand,
  alias make_s="make -s LIBTOOLFLAGS=--silent"

is pretty cheap, but requires the user to get up and invest half an inch
of effort.

So what to do?

> > FWIW, here's a patch that goes the "ugly design" way of implementing
> > this in libtool, which I think is portable.
> At least it works inside the autoconf, automake, libtool toolset. This is a 
> very common setup.

Yep.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]