63 lines
2.5 KiB
Makefile
Executable File
63 lines
2.5 KiB
Makefile
Executable File
#
|
|
# Copyright (C) 2008 The Android Open Source Project
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
##
|
|
## Common build system definitions. Mostly standard
|
|
## commands for building various types of targets, which
|
|
## are used by others to construct the final targets.
|
|
##
|
|
|
|
# These are variables we use to collect overall lists
|
|
# of things being processed.
|
|
|
|
RSRC_NULL_PATH = -
|
|
DEST_NULL_PATH = -
|
|
DEST_ETC_PATH_system = system/etc
|
|
DEST_FONTS_PATH_system = system/fonts
|
|
DEST_MEDIA_PATH_system = system/media
|
|
DEST_APP_PATH_system-priv = system/priv-app
|
|
DEST_APP_PATH_system = system/app
|
|
DEST_APP_PATH_data = data/app
|
|
DEST_APP_PATH_vendor_operator = system/vendor/operator/app
|
|
DEST_LIB_PATH_system-priv = system/lib
|
|
DEST_LIB_PATH_system = system/lib
|
|
DEST_LIB_PATH_data = $(DEST_NULL_PATH)
|
|
|
|
|
|
###########################################################
|
|
## Commands for smart copying files
|
|
###########################################################
|
|
|
|
# $(1): a list of map, for which each entry with a format of file:target, it's well done except target with DEST_NULL_PATH
|
|
define up-smart-copy-file-to-target
|
|
$(eval unique_copy_files_destinations :=) \
|
|
$(foreach cf,$(1), \
|
|
$(eval _dest := $(lastword $(subst :, ,$(cf)))) \
|
|
$(if $(filter $(DEST_NULL_PATH), $(_dest)), ,\
|
|
$(eval _src := $(wildcard $(firstword $(subst :, ,$(cf))))) \
|
|
$(foreach __src, $(_src), \
|
|
$(eval __dest := $(subst //,/,$(PRODUCT_OUT)/$(_dest)/$(notdir $(__src)))) \
|
|
$(if $(filter $(unique_copy_files_destinations),$(__dest)), \
|
|
$(error discovered $(__dest) comes from serveral different location, please fix it), \
|
|
$(eval $(call copy-one-file,$(__src),$(__dest))) $(eval ALL_DEFAULT_INSTALLED_MODULES += $(__dest)) \
|
|
$(eval unique_copy_files_destinations += $(__dest))) \
|
|
) \
|
|
) \
|
|
) \
|
|
$(eval unique_copy_files_destinations :=)
|
|
endef
|
|
|