xref: /bionic/CleanSpec.mk (revision bdb678c9)
155cd975fSJean-Baptiste Queru# Copyright (C) 2007 The Android Open Source Project
255cd975fSJean-Baptiste Queru#
355cd975fSJean-Baptiste Queru# Licensed under the Apache License, Version 2.0 (the "License");
455cd975fSJean-Baptiste Queru# you may not use this file except in compliance with the License.
555cd975fSJean-Baptiste Queru# You may obtain a copy of the License at
655cd975fSJean-Baptiste Queru#
755cd975fSJean-Baptiste Queru#      http://www.apache.org/licenses/LICENSE-2.0
855cd975fSJean-Baptiste Queru#
955cd975fSJean-Baptiste Queru# Unless required by applicable law or agreed to in writing, software
1055cd975fSJean-Baptiste Queru# distributed under the License is distributed on an "AS IS" BASIS,
1155cd975fSJean-Baptiste Queru# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1255cd975fSJean-Baptiste Queru# See the License for the specific language governing permissions and
1355cd975fSJean-Baptiste Queru# limitations under the License.
1455cd975fSJean-Baptiste Queru#
1555cd975fSJean-Baptiste Queru
1655cd975fSJean-Baptiste Queru# If you don't need to do a full clean build but would like to touch
1755cd975fSJean-Baptiste Queru# a file or delete some intermediate files, add a clean step to the end
1855cd975fSJean-Baptiste Queru# of the list.  These steps will only be run once, if they haven't been
1955cd975fSJean-Baptiste Queru# run before.
2055cd975fSJean-Baptiste Queru#
2155cd975fSJean-Baptiste Queru# E.g.:
2255cd975fSJean-Baptiste Queru#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
2355cd975fSJean-Baptiste Queru#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
2455cd975fSJean-Baptiste Queru#
2555cd975fSJean-Baptiste Queru# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
2655cd975fSJean-Baptiste Queru# files that are missing or have been moved.
2755cd975fSJean-Baptiste Queru#
2855cd975fSJean-Baptiste Queru# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
2955cd975fSJean-Baptiste Queru# Use $(OUT_DIR) to refer to the "out" directory.
3055cd975fSJean-Baptiste Queru#
3155cd975fSJean-Baptiste Queru# If you need to re-do something that's already mentioned, just copy
3255cd975fSJean-Baptiste Queru# the command and add it to the bottom of the list.  E.g., if a change
3355cd975fSJean-Baptiste Queru# that you made last week required touching a file and a change you
3455cd975fSJean-Baptiste Queru# made today requires touching the same file, just copy the old
3555cd975fSJean-Baptiste Queru# touch step and add it to the end of the list.
3655cd975fSJean-Baptiste Queru#
3755cd975fSJean-Baptiste Queru# ************************************************
3855cd975fSJean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
3955cd975fSJean-Baptiste Queru# ************************************************
4055cd975fSJean-Baptiste Queru
4155cd975fSJean-Baptiste Queru# For example:
4255cd975fSJean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
4355cd975fSJean-Baptiste Queru#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
4455cd975fSJean-Baptiste Queru#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
4555cd975fSJean-Baptiste Queru#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
4655cd975fSJean-Baptiste Queru
478e32b7b3SChristopher Ferris# Switching to jemalloc requires deleting these files.
488e32b7b3SChristopher Ferris$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libc_*)
498e32b7b3SChristopher Ferris$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libc_*)
508e32b7b3SChristopher Ferris
51b840591bSNarayan Kamath# Required due to the replacement of a symlink with a shared library
52b840591bSNarayan Kamath# (commit b952f42bef69e5c in frameworks/native).
53b840591bSNarayan Kamath$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib/libGLES*)
54b840591bSNarayan Kamath$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib64/libGLES*)
55b840591bSNarayan Kamath
5680c5e623SJiyong Park# /bionic is removed
5780c5e623SJiyong Park$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/bionic)
5880c5e623SJiyong Park$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/bionic)
5980c5e623SJiyong Park
60*3274cc46SMartin Stjernholm# Ensure libdl_android.so is (only) in the correct locations after the move into
61*3274cc46SMartin Stjernholm# the Runtime APEX.
62*3274cc46SMartin Stjernholm$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.runtime/lib{,64})
63*3274cc46SMartin Stjernholm$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib{,64})
64*3274cc46SMartin Stjernholm
6555cd975fSJean-Baptiste Queru# ************************************************
6655cd975fSJean-Baptiste Queru# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
6755cd975fSJean-Baptiste Queru# ************************************************
68