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