12d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project
22d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
32d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License");
42d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# you may not use this file except in compliance with the License.
52d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# You may obtain a copy of the License at
62d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
72d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#      http://www.apache.org/licenses/LICENSE-2.0
82d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
92d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software
102d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS,
112d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# See the License for the specific language governing permissions and
132d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# limitations under the License.
142d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
152d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru
162d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# If you don't need to do a full clean build but would like to touch
172d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end
182d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# of the list.  These steps will only be run once, if they haven't been
192d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# run before.
202d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
212d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# E.g.:
222d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
232d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
242d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
252d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
262d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# files that are missing or have been moved.
272d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
282d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
292d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory.
302d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
312d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy
322d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# the command and add it to the bottom of the list.  E.g., if a change
332d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# that you made last week required touching a file and a change you
342d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# made today requires touching the same file, just copy the old
352d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# touch step and add it to the end of the list.
362d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#
372d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# ************************************************
382d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
392d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# ************************************************
402d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru
412d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# For example:
422d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
432d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
442d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
452d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
462d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru
472d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# ************************************************
482d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
492d40e32fc1cb42719ed25f774bd6a6023e8a5c6bJean-Baptiste Queru# ************************************************
506a0e513d7d40e34caeb85fe55d21609946448915Elliott Hughes$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/obj/STATIC_LIBRARIES/libfdlibm-host_intermediates)
516a0e513d7d40e34caeb85fe55d21609946448915Elliott Hughes$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libfdlibm_intermediates)
52