help-make
[Top][All Lists]
Advanced

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

Re: Weird performance problem


From: David Boyce
Subject: Re: Weird performance problem
Date: Thu, 15 Jul 2010 10:34:32 -0400

On Wed, Jul 14, 2010 at 2:03 PM, Leandro Lucarella <address@hidden> wrote:
> Just to clarify, I included the shell in the command invocation to try
> different shells:
>
> all:
>        bash -c 'program'
>
> For example.

This may not do what you think though - the result *could* be to execute

    /bin/sh -c "bash -c 'program'"

The way to change shells is to set "SHELL := /bin/bash" in the Makefile.

Also, you should consider the "fast path" optimization which removes
the shell entirely - your test case may be being optimized in this
way. There's no particular reason to think it's a problem but it is a
thing you can easily vary and measure. Append a ";" to the command
line to defeat the optimization and guarantee a shell.

I would also experiment using the following little Makefile:

% cat Makefile
all: ; $(SHELL)

Now when you type "make" you will have reproduced the exact[*]
environment within which your test is executed, but interactively.
This makes it easy to do things like running it from the command line
while still "within make", comparing the environment from inside and
out, etc.

[*] It may not be quite exact because, depending on shell, an
interactive invocation may drag in different config files from a
non-interactive one. But I gather you've already ruled out shell
startup issues.

David Boyce



reply via email to

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