0

I have a complicated set of android make files that include each other. As a result, LOCAL_C_INCLUDES of the main make file becomes very long with many duplicates of the same paths.

Is there some way to remove duplicates, perhaps by calling some function?

1 Answer 1

0

I solved this by calling a python script via shell. The script takes the current value of LOCAL_C_INCLUDES and returns it without duplicated paths, like this:

LOCAL_C_INCLUDES := $(shell python -c "import sys;print(' '.join(set(sys.argv[1].split())))" "$(LOCAL_C_INCLUDES)")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.