[PATCH] Avoid unnecessary binary calls in makefiles

Florian Bruhin me at the-compiler.org
Wed Feb 5 08:02:23 CET 2014


* Thorsten Wißmann <edu at thorsten-wissmann.de> [2014-02-04 18:22:01 +0100]:
> On Wed, Jan 08, 2014 at 06:00:31PM +0100, Florian Bruhin wrote:
> > This avoids calling binaries from the Makefile more often than they
> > need to.
> > 
> > before:
> > 
> > $ make clean > /dev/null; strace -f make 2>&1 | grep -c 'execve(.* = 0'
> > 558
> > 
> > after:
> > 
> > $ make clean > /dev/null; strace -f make 2>&1 | grep -c 'execve(.* = 0'
> > 153
> 
> Is this really of relevance?
> 
> -INCS = -Isrc/ -I/usr/include -I${X11INC}  `pkg-config --cflags glib-2.0`
> -LIBS = -lc -L${X11LIB} -lXext -lX11 $(XINERAMALIBS) `pkg-config --libs glib-2.0`
> +INCS := -Isrc/ -I/usr/include -I${X11INC} $(shell pkg-config --cflags glib-2.0)
> +LIBS := -lc -L${X11LIB} -lXext -lX11 $(XINERAMALIBS) $(shell pkg-config --libs glib-2.0)
> 
> IMO the first one looks more compact and more make'ish, as everything
> with parenthesis $(...) is GNU Make only. Our makefile is gnu make only,
> anyway, but is it such important for you? I mean it only affects build
> performance and is not run regularly.

I don't care at all ;)

Usually I do such stuff because I want to learn something and do
something useful at the same time. If the patch isn't accepted then
that's fine (you're the BDFL[1] after all), I still learned something
:)

Flo

[1] Benevolent Dictator for Life, https://en.wikipedia.org/wiki/Benevolent_Dictator_For_Life

-- 
() ascii ribbon campaign - stop html mail    www.asciiribbon.org
/\ www.the-compiler.org  | I love long mails http://email.is-not-s.ms/
"There are things that are so serious that you can only joke about them" - 
Heisenberg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140205/a0238096/attachment.sig>


More information about the hlwm mailing list