Skip to content
Browse files

Add to PRODUCT_COPY_FILES/PRODUCT_PACKAGES instead of replacing

Change-Id: I317b5ac3399cf82e4c708b52d84112d4b7b7d3df
  • Loading branch information...
1 parent 1333283 commit da67dc6db7e953e9e9c46bacf3702f9491298819 @mvines mvines committed
Showing with 3 additions and 4 deletions.
  1. +3 −4 fonts.mk
View
7 fonts.mk
@@ -15,7 +15,7 @@
# Warning: this is actually a product definition, to be inherited from
# Android fonts
-PRODUCT_COPY_FILES := \
+PRODUCT_COPY_FILES += \
frameworks/base/data/fonts/DroidNaskh-Regular.ttf:system/fonts/DroidNaskh-Regular.ttf \
frameworks/base/data/fonts/DroidSansHebrew-Regular.ttf:system/fonts/DroidSansHebrew-Regular.ttf \
frameworks/base/data/fonts/DroidSansHebrew-Bold.ttf:system/fonts/DroidSansHebrew-Bold.ttf \
@@ -28,12 +28,11 @@ PRODUCT_COPY_FILES := \
frameworks/base/data/fonts/DroidSerif-BoldItalic.ttf:system/fonts/DroidSerif-BoldItalic.ttf \
$(NULL)
-PRODUCT_PACKAGES := \
+PRODUCT_PACKAGES += \
DroidSansFallback.ttf
# MozTT fonts
-PRODUCT_COPY_FILES := \
- $(PRODUCT_COPY_FILES) \
@michaelwu Mozilla-B2G member

The manual += done here is actually somewhat intentional - IIRC it forces make to expand variables now instead of waiting until PRODUCT_COPY_FILES is used, which makes things faster. Probably doesn't matter a whole lot in this case I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+PRODUCT_COPY_FILES += \
external/moztt/CharisSILCompact-4.110/CharisSILCompact-B.ttf:system/fonts/CharisSILCompact-B.ttf \
external/moztt/CharisSILCompact-4.110/CharisSILCompact-BI.ttf:system/fonts/CharisSILCompact-BI.ttf \
external/moztt/CharisSILCompact-4.110/CharisSILCompact-I.ttf:system/fonts/CharisSILCompact-I.ttf \

2 comments on commit da67dc6

@mvines

Provided that the initial declaration of PRODUCT_COPY_FILES is set as a simple variable (:=) then all subsequent += will not be deferred so no performance impact (however negligible it would be!)

@michaelwu
Mozilla-B2G member

Ahh, didn't know that. I just read the gnu manual about this which confirms this behavior. Thanks for the info.

Please sign in to comment.
Something went wrong with that request. Please try again.