16e21232cSEd Heyl# Copyright (C) 2007 The Android Open Source Project
26e21232cSEd Heyl#
36e21232cSEd Heyl# Licensed under the Apache License, Version 2.0 (the "License");
46e21232cSEd Heyl# you may not use this file except in compliance with the License.
56e21232cSEd Heyl# You may obtain a copy of the License at
66e21232cSEd Heyl#
76e21232cSEd Heyl#      http://www.apache.org/licenses/LICENSE-2.0
86e21232cSEd Heyl#
96e21232cSEd Heyl# Unless required by applicable law or agreed to in writing, software
106e21232cSEd Heyl# distributed under the License is distributed on an "AS IS" BASIS,
116e21232cSEd Heyl# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
126e21232cSEd Heyl# See the License for the specific language governing permissions and
136e21232cSEd Heyl# limitations under the License.
146e21232cSEd Heyl#
156e21232cSEd Heyl
166e21232cSEd Heyl# If you don't need to do a full clean build but would like to touch
176e21232cSEd Heyl# a file or delete some intermediate files, add a clean step to the end
186e21232cSEd Heyl# of the list.  These steps will only be run once, if they haven't been
196e21232cSEd Heyl# run before.
206e21232cSEd Heyl#
216e21232cSEd Heyl# E.g.:
226e21232cSEd Heyl#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
236e21232cSEd Heyl#     $(call add-clean-step, rm -rf $(OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
246e21232cSEd Heyl#
256e21232cSEd Heyl# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
266e21232cSEd Heyl# files that are missing or have been moved.
276e21232cSEd Heyl#
286e21232cSEd Heyl# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
296e21232cSEd Heyl# Use $(OUT) to refer to the "out" directory.
306e21232cSEd Heyl#
316e21232cSEd Heyl# If you need to re-do something that's already mentioned, just copy
326e21232cSEd Heyl# the command and add it to the bottom of the list.  E.g., if a change
336e21232cSEd Heyl# that you made last week required touching a file and a change you
346e21232cSEd Heyl# made today requires touching the same file, just copy the old
356e21232cSEd Heyl# touch step and add it to the end of the list.
366e21232cSEd Heyl#
376e21232cSEd Heyl# ************************************************
386e21232cSEd Heyl# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
396e21232cSEd Heyl# ************************************************
406e21232cSEd Heyl
416e21232cSEd Heyl# For example:
426e21232cSEd Heyl#$(call add-clean-step, rm -rf $(OUT)/target/common/obj/APPS/AndroidTests_intermediates)
436e21232cSEd Heyl#$(call add-clean-step, rm -rf $(OUT)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
446e21232cSEd Heyl#$(call add-clean-step, find $(OUT) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
456e21232cSEd Heyl#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
466e21232cSEd Heyl#$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
476e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
486e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
496e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
506e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
516e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
526e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
536e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/SHARED_LIBRARIES/libdvm*)
546e21232cSEd Heyl# ************************************************
556e21232cSEd Heyl# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
566e21232cSEd Heyl# ************************************************
576e21232cSEd Heyl$(call add-clean-step, rm -rf $(OUT)/obj/STATIC_LIBRARIES/libdex_intermediates/import_includes)
58