1 #
2 # Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
90 define CleanTest
91 @$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
92 @$(ECHO) "" $(LOG_DEBUG)
93 $(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
94 # Remove as much of the test directory structure as is empty
95 $(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
96 @$(ECHO) " done"
97 endef
98
99 define Clean-gensrc
100 @$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
101 @$(ECHO) "" $(LOG_DEBUG)
102 $(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
103 @$(ECHO) " done"
104 endef
105
106 define Clean-java
107 @$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
108 @$(ECHO) "" $(LOG_DEBUG)
109 $(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
110 $(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
111 $(ECHO) " done"
112 $(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
113 $(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
114 @$(ECHO) " done"
115 endef
116
117 define Clean-native
118 @$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
119 @$(ECHO) "" $(LOG_DEBUG)
120 $(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
121 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
122 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
123 @$(ECHO) " done"
124 endef
125
126 define Clean-include
127 @$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
128 @$(ECHO) "" $(LOG_DEBUG)
129 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
|
1 #
2 # Copyright (c) 2011, 2026, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
90 define CleanTest
91 @$(PRINTF) "Cleaning test %s ..." "$(strip $1)"
92 @$(ECHO) "" $(LOG_DEBUG)
93 $(RM) -r $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))
94 # Remove as much of the test directory structure as is empty
95 $(RMDIR) -p $(dir $(SUPPORT_OUTPUTDIR)/test/$(strip $(subst -,/,$1))) 2> /dev/null || true
96 @$(ECHO) " done"
97 endef
98
99 define Clean-gensrc
100 @$(PRINTF) "Cleaning gensrc %s..." "$(if $1,for $(strip $1) )"
101 @$(ECHO) "" $(LOG_DEBUG)
102 $(RM) -r $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)
103 @$(ECHO) " done"
104 endef
105
106 define Clean-java
107 @$(PRINTF) "Cleaning java %s..." "$(if $1,for $(strip $1) )"
108 @$(ECHO) "" $(LOG_DEBUG)
109 $(RM) -r $(JDK_OUTPUTDIR)/modules/$(strip $1)
110 $(RM) -r $(SUPPORT_OUTPUTDIR)/preview/$(strip $1)
111 $(RM) -r $(SUPPORT_OUTPUTDIR)/special_classes/$(strip $1)
112 $(ECHO) " done"
113 $(PRINTF) "Cleaning headers %s..." "$(if $1,for $(strip $1) )"
114 $(RM) -r $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)
115 @$(ECHO) " done"
116 endef
117
118 define Clean-native
119 @$(PRINTF) "Cleaning native %s..." "$(if $1,for $(strip $1) )"
120 @$(ECHO) "" $(LOG_DEBUG)
121 $(RM) -r $(SUPPORT_OUTPUTDIR)/native/$(strip $1)
122 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
123 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
124 @$(ECHO) " done"
125 endef
126
127 define Clean-include
128 @$(PRINTF) "Cleaning include %s..." "$(if $1,for $(strip $1) )"
129 @$(ECHO) "" $(LOG_DEBUG)
130 $(RM) -r $(SUPPORT_OUTPUTDIR)/modules_include/$(strip $1)
|