[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pass variables to submake
From: |
Eric West |
Subject: |
Re: Pass variables to submake |
Date: |
Fri, 25 Nov 2005 23:34:38 -0500 |
User-agent: |
KMail/1.8.2 |
On Wednesday 23 November 2005 06:44 am, address@hidden wrote:
> Hi, all,
>
> I'd like to override submake's CPPFLAGS when I run "make debug" at
> the top level. I've tried in my top level Makefile, for example:
>
> ...
> debug:
> export CPPFLAGS=-g
> $(MAKE) -C subdir
>
> In my sub Makefile, I used this kind of rules:
>
> ...
> %.o : %.cc
> $(CXX) -c $< -o $@ $(CPPFLAGS)
> ...
>
> I failed to get "-g" to my sub Makefile. Could you point out what
> might help? Or what can be an alternative solution?
>
Try
...
debug:
$(MAKE) -C subdir CPPFLAGS=-g
--Eric