最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

several methods of pass/export variable from top/parent make/makefile to sub/child make/makefile

工作和技术 crifan 1711浏览 0评论

several methods of pass/export variable from top/parent make/makefile to sub/child make/makefile

1.
test_value=1234567
export test_value

some_target:
 make -f sub_makefile.mak

2.
test_value = 1234567

some_target:
 export test_value=$(test_value);
 make -f sub_makefile.mak

———-this method equal to———-
#test_value = 1234567

some_target:
 test_value = 1234567; export test_value;
 make -f sub_makefile.mak

3.
some_target:
 make -f sub_makefile.mak test_value = 1234567

——————————————————————

note:
in makefile:
“export test_value=1234567”
is equal to
“test_value=1234567
export test_value”

转载请注明:在路上 » several methods of pass/export variable from top/parent make/makefile to sub/child make/makefile

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
79 queries in 0.167 seconds, using 22.06MB memory