161d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project 261d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 361d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License"); 461d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# you may not use this file except in compliance with the License. 561d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# You may obtain a copy of the License at 661d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 761d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# http://www.apache.org/licenses/LICENSE-2.0 861d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 961d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software 1061d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS, 1161d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# See the License for the specific language governing permissions and 1361d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# limitations under the License. 1461d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 1561d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru 1661d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# If you don't need to do a full clean build but would like to touch 1761d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end 1861d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# of the list. These steps will only be run once, if they haven't been 1961d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# run before. 2061d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 2161d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# E.g.: 2261d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 2361d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 2461d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 2561d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 2661d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# files that are missing or have been moved. 2761d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 2861d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 2961d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory. 3061d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 3161d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy 3261d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# the command and add it to the bottom of the list. E.g., if a change 3361d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# that you made last week required touching a file and a change you 3461d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# made today requires touching the same file, just copy the old 3561d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# touch step and add it to the end of the list. 3661d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# 3761d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# ************************************************ 3861d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 3961d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# ************************************************ 4061d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru 4161d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# For example: 4261d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 4361d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 4461d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 4561d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 466a7003d1b9bf20f4c6e001d054b1ab556ddec4a4RoboErik$(call add-clean-step, rm -rf $(OUT_DIR)/out/target/common/obj/APPS/Calendar_intermediates) 4761d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru 4861d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# ************************************************ 4961d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 5061d22b4f9f744bfc5cd64816c285e280b8e297a3Jean-Baptiste Queru# ************************************************ 51