18e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project 28e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 38e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License"); 48e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# you may not use this file except in compliance with the License. 58e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# You may obtain a copy of the License at 68e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 78e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# http://www.apache.org/licenses/LICENSE-2.0 88e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 98e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software 108e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS, 118e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 128e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# See the License for the specific language governing permissions and 138e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# limitations under the License. 148e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 158e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru 168e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# If you don't need to do a full clean build but would like to touch 178e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end 188e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# of the list. These steps will only be run once, if they haven't been 198e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# run before. 208e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 218e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# E.g.: 228e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 238e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 248e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 258e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 268e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# files that are missing or have been moved. 278e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 288e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 298e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory. 308e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 318e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy 328e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# the command and add it to the bottom of the list. E.g., if a change 338e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# that you made last week required touching a file and a change you 348e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# made today requires touching the same file, just copy the old 358e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# touch step and add it to the end of the list. 368e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# 378e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# ************************************************ 388e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 398e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# ************************************************ 408e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru 418e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# For example: 428e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 438e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 448e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 458e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 468e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru 478e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# ************************************************ 488e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 498e73b59cb96728872715ab00b374815d6b974e24Jean-Baptiste Queru# ************************************************ 50