help-make
[Top][All Lists]
Advanced

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

Preventing variables from being passed to a sub-make


From: Will Newton
Subject: Preventing variables from being passed to a sub-make
Date: Wed, 6 Jun 2007 17:29:29 +0100

Hello,

I'm having problems stopping make from passing variables passed on the
command line to a sub-make.

My toplevel make does this:

$(MAKE) -C subdir1 BUILD_DIR=builddir

subdir1/Makefile then does:

$(MAKE) -C subdir2

subdir2/Makefile happens to use the variable BUILD_DIR in an
incompatible way to the top-level variable so I would like to stop it
being passed via MAKEFLAGS. Is there a way to do this?

The manual mentions unsetting MAKEFLAGS or MAKEOVERRIDES but this
seems to have no effect.

$(MAKE) -C subdir2 MAKEFLAGS= MAKEOVERRIDES=

Behaves in the same way.

Is what I'm trying to do possible with GNU make?

Thanks,




reply via email to

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