help-make
[Top][All Lists]
Advanced

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

Re: Can you export rules in Make?


From: Paul Smith
Subject: Re: Can you export rules in Make?
Date: Mon, 04 Apr 2011 16:05:38 -0400

On Mon, 2011-04-04 at 20:41 +0530, Ajay Jain wrote:
> I have a recursive make system, where a top level makefile just calls
> the makefile of a subdirectory. I export variables from top level to
> sub make. Now I realize that I have to repeat all rules. Is there a
> way .. by which even the rules can be communicated from top level make
> to the sub make?

No.  Make variables are exported through the environment just like any
other environment variable.  There's no way to put rules into the
environment.

> OR should I just include a common rules.mk in both
> the Makefiles?

That's the typical solution.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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