Create the hiddenapi files if frameworks/base is missing.

This is required to build ART for target with the master-art
manifest.

Change-Id: I9666aa0966a17199b6d33ae75591dfc15ae6731a
diff --git a/Android.mk b/Android.mk
index 0a90a0b..361ceec 100644
--- a/Android.mk
+++ b/Android.mk
@@ -447,6 +447,19 @@
 include $(BUILD_PHONY_PACKAGE)
 endif
 
+# Create dummy hidden API lists which are normally generated by the framework
+# but which we do not have in the master-art manifest.
+# We need to execute this now to ensure Makefile rules depending on these files can
+# be constructed.
+define build-art-hiddenapi
+$(shell if [ ! -d frameworks/base ]; then \
+  mkdir -p ${TARGET_OUT_COMMON_INTERMEDIATES}/PACKAGING; \
+	touch ${TARGET_OUT_COMMON_INTERMEDIATES}/PACKAGING/hiddenapi-{blacklist,dark-greylist,light-greylist}.txt; \
+  fi;)
+endef
+
+$(eval $(call build-art-hiddenapi))
+
 ########################################################################
 # "m build-art" for quick minimal build
 .PHONY: build-art
@@ -460,6 +473,7 @@
 
 ########################################################################
 # Phony target for only building what go/lem requires for pushing ART on /data.
+
 .PHONY: build-art-target-golem
 # Also include libartbenchmark, we always include it when running golem.
 # libstdc++ is needed when building for ART_TARGET_LINUX.