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 <[email protected]>          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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to