142223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Copyright (C) 2012 The Android Open Source Project 242223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 342223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Licensed under the Apache License, Version 2.0 (the "License"); 442223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# you may not use this file except in compliance with the License. 542223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# You may obtain a copy of the License at 642223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 742223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# http://www.apache.org/licenses/LICENSE-2.0 842223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 942223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Unless required by applicable law or agreed to in writing, software 1042223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# distributed under the License is distributed on an "AS IS" BASIS, 1142223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1242223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# See the License for the specific language governing permissions and 1342223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# limitations under the License. 1442223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 1542223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody 1642223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# If you don't need to do a full clean build but would like to touch 1742223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# a file or delete some intermediate files, add a clean step to the end 1842223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# of the list. These steps will only be run once, if they haven't been 1942223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# run before. 2042223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 2142223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# E.g.: 2242223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 2342223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 2442223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 2542223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 2642223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# files that are missing or have been moved. 2742223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 2842223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 2942223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# Use $(OUT_DIR) to refer to the "out" directory. 3042223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 3142223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# If you need to re-do something that's already mentioned, just copy 3242223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# the command and add it to the bottom of the list. E.g., if a change 3342223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# that you made last week required touching a file and a change you 3442223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# made today requires touching the same file, just copy the old 3542223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# touch step and add it to the end of the list. 3642223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# 3742223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# ************************************************ 3842223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 3942223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# ************************************************ 4042223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody 4142223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# For example: 4242223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 4342223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 4442223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 4542223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 4642223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody 4742223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# ************************************************ 4842223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 4942223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody# ************************************************ 5042223f6fdd582dc4e87ad94c212adaed3341f154Jeff Boody$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "libgui*" -print0 | xargs -0 rm -f) 513fbbd076ad571810d9107ed870cfce2e8c062d10Raph Levien$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libgui_intermediates) 52d920670f252d7984f8729cd578ce8c0befa77273Stephen Hines$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libgui_intermediates) 53