I would just like to ask what should be written in the Android.mk file to also call the mk files in the sub-directories of the current directory.
Example:
/packages/Android.mk
/package/groupA/Android.mk
/packages/groupA/AppA/Android.mk
/packages/groupA/AppB/Android.mk
I know that by using include $(call all-subdir-makefiles)
, the Android.mk file in the immediate sub-directory will be read (example: /package/groupA/Android.mk). However, /packages/groupA/AppA/Android.mk and /packages/groupA/AppB/Android.mk will not be read.
I wonder if there is other macro that do the recursive reading of the Android.mk for all sub-directories.
Thanks,
artsylar
The most convenient solution is putting include $(call all-subdir-makefiles)
command also inside /package/groupA/Android.mk
file.
However, if you want only third-level mk files then you can use the following command:
include $(wildcard $(call my-dir)/*/*/Android.mk)
And here is a fully recursive solution, but it relies on find
command from the shell:
include $(filter-out $(call my-dir)/Android.mk,$(shell find $(call my-dir)/ -type f -name Android.mk))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With