115c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project 215c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 315c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License"); 415c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# you may not use this file except in compliance with the License. 515c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# You may obtain a copy of the License at 615c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 715c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# http://www.apache.org/licenses/LICENSE-2.0 815c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 915c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software 1015c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS, 1115c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1215c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# See the License for the specific language governing permissions and 1315c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# limitations under the License. 1415c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 1515c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru 1615c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# If you don't need to do a full clean build but would like to touch 1715c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end 1815c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# of the list. These steps will only be run once, if they haven't been 1915c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# run before. 2015c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 2115c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# E.g.: 2215c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 2315c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 2415c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 2515c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 2615c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# files that are missing or have been moved. 2715c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 2815c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 2915c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory. 3015c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 3115c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy 3215c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# the command and add it to the bottom of the list. E.g., if a change 3315c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# that you made last week required touching a file and a change you 3415c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# made today requires touching the same file, just copy the old 3515c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# touch step and add it to the end of the list. 3615c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# 3715c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# ************************************************ 3815c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 3915c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# ************************************************ 4015c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru 4115c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# For example: 4215c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 4315c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 4415c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 4515c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 4615c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru 4715c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# ************************************************ 4815c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 4915c85a49a28122d46e315f0f923ab7590a282604Jean-Baptiste Queru# ************************************************ 50