Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ac5a645 authored by Spandan Das's avatar Spandan Das
Browse files

Normalize filepath comment for gen files in build.prop

build.prop contains a `# from $filepath` comment to log the origin of a
sysprop. This is useful to have, but causes the metadata of
vendor/build.prop to be different between make and soong built
partitions. This CL replaces the absolute filepath of generated files
with their filenames in the build.prop comment.

Bug: 382295862
Test: commented out notice files in build/make/core/Makefile
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
Test: export BUILD_DATETIME=10
Test: verified that vendor.img built by make and soong have the same
sha

Change-Id: I48f28aae6f6c1d51dc37e9cd19865fe6eb7c8ea9
parent c06c02d4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -122,11 +122,19 @@ $(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(3) $(6) $(BUILT_KERN
ifneq ($(strip $(7)), true)
	$(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
endif
        # Make and Soong use different intermediate files to build vendor/build.prop.
        # Although the sysprop contents are same, the absolute paths of android_info.prop are different.
        # Print the filename for the intermediate files (files in OUT_DIR).
        # This helps with validating mk->soong migration of android partitions.
	$(hide) $(foreach file,$(strip $(3)),\
	    if [ -f "$(file)" ]; then\
	        echo "" >> $$@;\
	        echo "####################################" >> $$@;\
	        $(if $(filter $(OUT_DIR)/%,$(file)), \
		echo "# from $(notdir $(file))" >> $$@;\
		,\
		echo "# from $(file)" >> $$@;\
		)\
	        echo "####################################" >> $$@;\
	        cat $(file) >> $$@;\
	    fi;)