[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Variable export, recursion, and environment
From: |
Sankaranarayanan K V |
Subject: |
Variable export, recursion, and environment |
Date: |
Fri, 13 Oct 2000 15:27:39 +0530 |
User-agent: |
Mutt/1.2i |
Hi,
Consider a recursive make invocation.
Case 1:
1. The environment does NOT have a variable VAR set.
2. The top level Makefile does NOT export VAR.
3. The top level Makefile sets VAR to x.
Result: The sub-make invocation does NOT inherit a value for VAR.
Case 2:
Same as Case (1) except that the environment defines VAR=y.
Result: The sub-make invocation inherits a value for VAR.
But the value is x (set by the parent Makefile) and not y.
Somehow, this seems a bit strange to me.
What is the rationale behind such a behaviour?
I would expect make to either pass the environment value
_or_ not to pass any value at all to the sub-make.
Regards
Sankar
--
Sankaranarayanan K. V. | address@hidden
Motorola India Electronics Ltd | http://www.mot.com/miel
- Variable export, recursion, and environment,
Sankaranarayanan K V <=