1ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project
2ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
3ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License");
4ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# you may not use this file except in compliance with the License.
5ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# You may obtain a copy of the License at
6ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
7ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#      http://www.apache.org/licenses/LICENSE-2.0
8ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
9ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software
10ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS,
11ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# See the License for the specific language governing permissions and
13ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# limitations under the License.
14ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
15ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru
16ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# If you don't need to do a full clean build but would like to touch
17ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end
18ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# of the list.  These steps will only be run once, if they haven't been
19ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# run before.
20ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
21ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# E.g.:
22ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
23ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
24ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
25ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
26ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# files that are missing or have been moved.
27ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
28ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
29ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory.
30ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
31ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy
32ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# the command and add it to the bottom of the list.  E.g., if a change
33ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# that you made last week required touching a file and a change you
34ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# made today requires touching the same file, just copy the old
35ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# touch step and add it to the end of the list.
36ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#
37ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# ************************************************
38ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
39ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# ************************************************
40ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru
41ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# For example:
42ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
43ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
44ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
45ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
46ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru
47ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# ************************************************
48ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
49ffd82a77512f2d0971660e9cbd77242d8982a0b5Jean-Baptiste Queru# ************************************************
50