Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does -include mean in an Android.mk file?

Tags:

android

I am a newbie to Android makefiles. While reading this file I see a "-include" statement.

What does this actually mean to the build system?

like image 746
sob Avatar asked Dec 21 '15 11:12

sob


Video Answer


1 Answers

The include simply means that another makefile should be included. The - means that if the file to include doesn't exist it will simply be ignored:

We can also put a minus sign - in front of include (with no space in-between) to ignore filenames that do not exist. For example:

-include makefile1 makefile2 makefile3

If makefile2 does not exist, then make will skip it, and no error will occur. In general, inserting a minus sign in front of any command tells make to ignore errors that might occur during the execution of that command.

(source)

like image 173
Michael Avatar answered Sep 28 '22 04:09

Michael