cleanspec.mk revision cc45ee9c3c68f72391f5e7ba300312047d976bfa
1# Copyright (C) 2007 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16# Just bump this if you want to force a clean build.
17# **********************************************************************
18# WHEN DOING SO
19# 1. DELETE ANY "add-clean-step" ENTRIES THAT HAVE PILED UP IN THIS FILE.
20# 2. REMOVE ALL FILES NAMED CleanSpec.mk.
21# 3. BUMP THE VERSION.
22# IDEALLY, THOSE STEPS SHOULD BE DONE ATOMICALLY.
23# **********************************************************************
24#
25INTERNAL_CLEAN_BUILD_VERSION := 3
26#
27# ***********************************************************************
28# Do not touch INTERNAL_CLEAN_BUILD_VERSION if you've added a clean step!
29# ***********************************************************************
30
31# If you don't need to do a full clean build but would like to touch
32# a file or delete some intermediate files, add a clean step to the end
33# of the list.  These steps will only be run once, if they haven't been
34# run before.
35#
36# E.g.:
37#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
38#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
39#
40# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
41# files that are missing or have been moved.
42#
43# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
44# Use $(OUT_DIR) to refer to the "out" directory.
45#
46# If you need to re-do something that's already mentioned, just copy
47# the command and add it to the bottom of the list.  E.g., if a change
48# that you made last week required touching a file and a change you
49# made today requires touching the same file, just copy the old
50# touch step and add it to the end of the list.
51#
52# ************************************************
53# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
54# ************************************************
55
56# For example:
57#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
58#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
59#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
60#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
61$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
62$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
63$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
64$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
65$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.google.android.datamessaging_intermediates)
66$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
67$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/pvasflocal.cfg)
68$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes)
69$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
70$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
71$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
72$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/ringtones/Silence.ogg)
73$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio/ringtones/notifications/Silence.ogg)
74$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/passion/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
75$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.google.android.datamessaging_intermediates)
76$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libcrypto_intermediates)
77$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libssl_intermediates)
78$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/openssl_intermediates)
79$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/system/build.prop)
80$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
81$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
82$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
83$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/bugreport)
84$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
85$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
86$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm_intermediates)
87$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates)
88$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
89$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
90$(call add-clean-step, rm -rf $(OUT_DIR)/obj/target/common/obj/APPS/VoiceSearch_intermediates)
91$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/VoiceSearch_intermediates)
92$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgps-rpc_intermediates)
93$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/pdsm_atl_intermediates)
94$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libgps_intermediates)
95$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
96$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/*/system/app/Launcher.apk)
97$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/bluetooth/)
98$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/sholes/system/build.prop)
99$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/com.amazon.mp3_intermediates)
100$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/com.amazon.mp3.apk)
101$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
102$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
103$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
104$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
105$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
106$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
107$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
108$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/)
109$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
110$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
111$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
112$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
113$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
114$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/openssl_intermediates)
115$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
116$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
117$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libv8_intermediates)
118$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libwebcore_intermediates)
119$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libwebcore_intermediates)
120$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libjs_intermediates)
121$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libv8_intermediates)
122$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/os/IDropBoxService.java)
123$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
124$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
125$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
126$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
127$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/GoogleSubscribedFeedsProvider.apk)
128$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
129$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
130$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
131$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
132$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
133$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
134$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates)
135$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
136$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
137$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app)
138$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
139$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmediaplayerservice_intermediates)
140$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_intermediates)
141$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/GoogleServicesFramework_intermediates)
142$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/VoiceSearchWithKeyboard.apk)
143$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
144$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
145$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/vendor/google_voiceime)
146$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/QuickSearchBox.apk)
147$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm_intermediates)
148$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech)
149$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Email_intermediates)
150$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
151$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/EnhancedGoogleSearchProvider.apk)
152$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
153$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates)
154$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/GoogleCheckin.apk)
155$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm*)
156$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgtest_main_intermediates)
157$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgtest_intermediates)
158$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Music*)
159$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Music*)
160$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Music*)
161$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Music*)
162$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher.apk)
163$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/AlarmClock.apk)
164$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Calendar.apk)
165$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/DeskClock.apk)
166$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Email.apk)
167$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Facebook.apk)
168$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Gallery3D.apk)
169$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Maps.apk)
170$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/MyFaves.apk)
171$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/googlevoice.apk)
172$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/kickback.apk)
173$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/soundback.apk)
174$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/talkback.apk)
175$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Launcher*)
176$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher*.apk)
177$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Music*)
178$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Music*)
179$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/jsr305_intermediates)
180$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/guava_intermediates)
181$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
182$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/*)
183$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
184$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
185$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/*)
186$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
187
188# ************************************************
189# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
190# ************************************************
191
192subdir_cleanspecs := \
193    $(shell build/tools/findleaves.py --prune=out --prune=.repo --prune=.git . CleanSpec.mk)
194include $(subdir_cleanspecs)
195subdir_cleanspecs :=
196