summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2019-02-05 12:27:43 +0000
committerAnton Hansson <hansson@google.com>2019-02-05 12:27:43 +0000
commit74e8d18a0bf9340cb9ef76f8a99b56cf1fb0101c (patch)
treedd18190bcd4ed8e860597cc68542b8378307724e /rootdir
parent59a01499390d5c55acb5d136b818da53e0cc27d0 (diff)
downloadsystem_core-74e8d18a0bf9340cb9ef76f8a99b56cf1fb0101c.tar.gz
system_core-74e8d18a0bf9340cb9ef76f8a99b56cf1fb0101c.tar.bz2
system_core-74e8d18a0bf9340cb9ef76f8a99b56cf1fb0101c.zip
Remove product_services rules if it's merged away
TARGET_COPY_OUT_PRODUCT_SERVICES can be equal to TARGET_COPY_OUT_PRODUCT, in which case the ld.config lines containing PRODUCT_SERVICES are redundant. Test: make and diff Change-Id: I1dc24eb49d37f1ab0faa6eecdb0ccc974321f4ac
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/update_and_install_ld_config.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/rootdir/update_and_install_ld_config.mk b/rootdir/update_and_install_ld_config.mk
index 450be6664..852e234f3 100644
--- a/rootdir/update_and_install_ld_config.mk
+++ b/rootdir/update_and_install_ld_config.mk
@@ -118,7 +118,12 @@ endif
$(hide) sed -i.bak -e "s?%SANITIZER_RUNTIME_LIBRARIES%?$(PRIVATE_SANITIZER_RUNTIME_LIBRARIES)?g" $@
$(hide) sed -i.bak -e "s?%VNDK_VER%?$(PRIVATE_VNDK_VERSION_SUFFIX)?g" $@
$(hide) sed -i.bak -e "s?%PRODUCT%?$(TARGET_COPY_OUT_PRODUCT)?g" $@
+ifeq ($(TARGET_COPY_OUT_PRODUCT),$(TARGET_COPY_OUT_PRODUCT_SERVICES))
+ # Remove lines containing %PRODUCT_SERVICES% (identical to the %PRODUCT% ones)
+ $(hide) sed -i.bak -e "\?%PRODUCT_SERVICES%?d" $@
+else
$(hide) sed -i.bak -e "s?%PRODUCT_SERVICES%?$(TARGET_COPY_OUT_PRODUCT_SERVICES)?g" $@
+endif
$(hide) sed -i.bak -e "s?^$(PRIVATE_VNDK_VERSION_TAG)??g" $@
$(hide) sed -i.bak "/^\#VNDK[0-9]\{2\}\#.*$$/d" $@
$(hide) rm -f $@.bak