c - include Makefile in a makefile and passing defines -
i tring pass define 'cwroot' make file is included in other makefile. like: main.mk
$(info before top.mk cwroot=$(cwroot)) $(info before top.mk hc12lib=$(hc12lib)) include $(srcdir)\top.mk $(info after top.mk cwroot=$(cwroot)) $(info after top.mk hc12lib=$(hc12lib))
where top.mk contains:
$(info int top.mk cwroot=$(cwroot)) toolsdir = $(cwroot)\prog hc12lib = $(cwroot)\lib
i run make file following command:
c:\gmake\make.exe -p -f main.mk cwroot="c:\programs\freescale\codewars12" s12x
then back:
before top.mk cwroot=c:\programs\freescale\codewars12 before top.mk hc12lib= after top.mk cwroot=c:\programs\freescale\codewars12 after top.mk hc12lib=\lib
why not back?
after top.mk hc12lib=c:\programs\freescale\codewars12\lib
in other words why cwroot not passed top.mk?
and why not see $(info) text top.mk?
thanx, frank
Comments
Post a Comment