17a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project
27a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
37a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License");
47a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# you may not use this file except in compliance with the License.
57a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# You may obtain a copy of the License at
67a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
77a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#      http://www.apache.org/licenses/LICENSE-2.0
87a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
97a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software
107a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS,
117a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# See the License for the specific language governing permissions and
137a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# limitations under the License.
147a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
157a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru
167a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# If you don't need to do a full clean build but would like to touch
177a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end
187a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# of the list.  These steps will only be run once, if they haven't been
197a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# run before.
207a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
217a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# E.g.:
227a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
237a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
247a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
257a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
267a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# files that are missing or have been moved.
277a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
287a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
297a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory.
307a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
317a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy
327a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# the command and add it to the bottom of the list.  E.g., if a change
337a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# that you made last week required touching a file and a change you
347a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# made today requires touching the same file, just copy the old
357a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# touch step and add it to the end of the list.
367a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#
377a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# ************************************************
387a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
397a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# ************************************************
407a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru
417a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# For example:
427a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
437a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
447a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
457a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
467a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru
477a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# ************************************************
487a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
497a44e1eb03890d533e0d4dd5f60ebbde85298c00Jean-Baptiste Queru# ************************************************
50