1# Copyright 2012 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4include $(CLEAR_VARS)
5
6LOCAL_SRC_FILES := $(call all-subdir-java-files)
7
8LOCAL_MODULE := content
9
10include $(BUILD_JAVA_LIBRARY)
11
12include $(CLEAR_VARS)
13ALL_PREBUILT += $(TARGET_OUT)/bin/content
14$(TARGET_OUT)/bin/content : $(LOCAL_PATH)/content | $(ACP)
15	$(transform-prebuilt-to-target)
16
17NOTICE_FILE := NOTICE
18files_noticed := bin/content
19
20# Generate rules for a single file. The argument is the file path relative to
21# the installation root
22define make-notice-file
23
24$(TARGET_OUT_NOTICE_FILES)/src/$(1).txt: $(LOCAL_PATH)/$(NOTICE_FILE)
25	@echo Notice file: $$< -- $$@
26	@mkdir -p $$(dir $$@)
27	@cat $$< >> $$@
28
29$(TARGET_OUT_NOTICE_FILES)/hash-timestamp: $(TARGET_OUT_NOTICE_FILES)/src/$(1).txt
30
31endef
32
33$(foreach file,$(files_noticed),$(eval $(call make-notice-file,$(file))))
34