Build DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE.

DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE is installed on
/product/etc/vintf. It is considered as a replacement of
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE, so only one
of them may be defined. At build time, things like
SEPolicy versions etc. will be written to
/product/etc/vintf/compatibility_matrix.device.xml, just
like the /system one.

Also, split framework_compatibitity_matrix.xml to
system_compatibility_matrix.xml and product_compatibility_matrix.xml.
The latter two corresponds to matrices installed to respective
partitions only.

Test: build with DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE defined
Test: boot (sanity)
Bug: 120600021
Change-Id: I81f9a8f5028cbb88c45f44df04bccb8ccb483972
diff --git a/compatibility_matrices/compatibility_matrix.mk b/compatibility_matrices/compatibility_matrix.mk
index bafc84b..d22e510 100644
--- a/compatibility_matrices/compatibility_matrix.mk
+++ b/compatibility_matrices/compatibility_matrix.mk
@@ -17,7 +17,8 @@
 ##### Input Variables:
 # LOCAL_MODULE: required. Module name for the build system.
 # LOCAL_MODULE_CLASS: optional. Default is ETC.
-# LOCAL_MODULE_PATH: optional. Path of output file. Default is $(TARGET_OUT)/etc/vintf.
+# LOCAL_MODULE_PATH / LOCAL_MODULE_RELATIVE_PATH: required. (Relative) path of output file.
+#       If not defined, LOCAL_MODULE_RELATIVE_PATH will be "vintf".
 # LOCAL_MODULE_STEM: optional. Name of output file. Default is $(LOCAL_MODULE).
 # LOCAL_SRC_FILES: required. Local source files provided to assemble_vintf
 #       (command line argument -i).
@@ -48,7 +49,9 @@
 endif
 
 ifndef LOCAL_MODULE_PATH
-LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/vintf
+ifndef LOCAL_MODULE_RELATIVE_PATH
+$(error Either LOCAL_MODULE_PATH or LOCAL_MODULE_RELATIVE_PATH must be defined.)
+endif
 endif
 
 GEN := $(local-generated-sources-dir)/$(LOCAL_MODULE_STEM)