Yes, the "first" entry in PRODUCT_COPY_FILES for a destination wins, and
any others are ignored (and written to $OUT/product_copy_files_ignored.txt
during `dist` builds, though you can explicitly ask for it to be built with
`m` as well).

"first" can be a complicated topic with inherit-product however, so I'd
recommend verifying your changes carefully. The order between local
modifications to PRODUCT_* variables and inherit-product within a makefile
doesn't matter -- inherit-product just saves a list of files to be included
later, then combined into the inheritance tree.

- Dan

On Tue, Jul 9, 2024 at 11:54 AM 'chris simmonds' via Android Building <
android-building@googlegroups.com> wrote:

> Yes, make sure that B.mk is parsed before A.mk, because it is the first
> PRODUCT_COPY_FILES for a given destination that matters. For example, if I
> want to override the init.cutf_cvm.rc provided by aosp_cf.mk I can do it
> like this:
>
> PRODUCT_COPY_FILES +=
> $(LOCAL_PATH)/init.cutf_cvm.rc:vendor/etc/init/hw/init.cutf_cvm.rc
> $(call inherit-product, device/google/cuttlefish/vsoc_x86_64/phone/
> aosp_cf.mk)
>
> I suspect this works "by accident", but I have been using this trick in my
> device config for many years so I think it is reliable
>
> HTH,
> Chris Simmonds
>
> On Mon, 8 Jul 2024 at 17:34, Testing 33 <testingobjec...@gmail.com> wrote:
>
>> Hi, can we override specific PRODUCT_COPY_FILES entry ?
>> Example: if A.mk and B.mk are copying different files but at same
>> destination. then i want that B.mk's PRODUCT_COPY_FILES line should
>> override A.mk and that too without making any changes in A.mk.
>>
>> --
>> --
>> You received this message because you are subscribed to the "Android
>> Building" mailing list.
>> To post to this group, send email to android-building@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-building+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to android-building+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-building/a628996b-6338-4a96-b00c-ba357e8fcdb1n%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-building/a628996b-6338-4a96-b00c-ba357e8fcdb1n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/CAN%2BjWE9daQgFRZ0R5CsosamdJsPgu8iv4f72Si6%2BTe1EsLkRGw%40mail.gmail.com
> <https://groups.google.com/d/msgid/android-building/CAN%2BjWE9daQgFRZ0R5CsosamdJsPgu8iv4f72Si6%2BTe1EsLkRGw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHdnB3zyOAVkxnPmU5C%3DQdTo30mPuEooG%2BWxXcTQ4k2D2pQ%40mail.gmail.com.

Reply via email to