Properly build a git submodule with gnu make

谁都会走 提交于 2019-12-04 08:55:50

Your solution is correct in general - in your toplevel makefile you've added targets that works the subproject. It is the only proper way to work with a standalone (sub-)project, via its own makefile.

The specific problem you are asking about has to do with not terminating the libfoo dependent rule, and GNU make requires a rule to have commands, even if it is a no-op. Do this instead:

$(FOO_LIBSFILES): libfoo ; 

This is effectively the same no-op, but more idiomatic.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!