1 #
2 # Copyright (c) 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
23 # questions.
24 #
25
26 include MakeIncludeStart.gmk
27 ifeq ($(INCLUDE), true)
28
29 ################################################################################
30 # This file defines macros that sets up rules for running the spp.Spp build tool
31 ################################################################################
32
33 include Execute.gmk
34 include $(TOPDIR)/make/ToolsJdk.gmk
35
36 NON_BYTE_NUMBER_TYPES := char short int long float double
37 NUMBER_TYPES := byte $(NON_BYTE_NUMBER_TYPES)
38 PRIMITIVE_TYPES := boolean $(NUMBER_TYPES)
39
40 ################################################################################
41 # The Conv function converts a type given as first argument (as a normal Java
42 # native type name), into one of several corresponding strings, depending on
43 # the aspect given in the second argument
44 #
45 # The implementation dispatches the call to one of several Conv_<aspect> macros.
46 #
47 # arg $1: the type to convert
48 # arg $2: the aspect to convert for
49 # arg $3: byte order (only needed for certain aspects)
50 #
51 Conv = \
52 $(strip $(call Conv_$(strip $2),$(strip $1),$(strip $3)))
53
54 ################################################################################
55 # Conv_<aspect> implementations
56
57 # Return a single letter representing the type (lowercase first letter)
58 Conv_x = \
|
1 #
2 # Copyright (c) 2025, 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
23 # questions.
24 #
25
26 include MakeIncludeStart.gmk
27 ifeq ($(INCLUDE), true)
28
29 ################################################################################
30 # This file defines macros that sets up rules for running the spp.Spp build tool
31 ################################################################################
32
33 include Execute.gmk
34 include $(TOPDIR)/make/ToolsJdk.gmk
35
36 NON_BYTE_INTEGER_TYPES := char short int long
37 NON_BYTE_NUMBER_TYPES := $(NON_BYTE_INTEGER_TYPES) float double
38 NUMBER_TYPES := byte $(NON_BYTE_NUMBER_TYPES)
39 INTEGER_NUMBER_TYPES := byte $(NON_BYTE_INTEGER_TYPES)
40 PRIMITIVE_TYPES := boolean $(NUMBER_TYPES)
41 BITWISE_PRIMITIVE_TYPES := boolean $(INTEGER_NUMBER_TYPES)
42
43 ################################################################################
44 # The Conv function converts a type given as first argument (as a normal Java
45 # native type name), into one of several corresponding strings, depending on
46 # the aspect given in the second argument
47 #
48 # The implementation dispatches the call to one of several Conv_<aspect> macros.
49 #
50 # arg $1: the type to convert
51 # arg $2: the aspect to convert for
52 # arg $3: byte order (only needed for certain aspects)
53 #
54 Conv = \
55 $(strip $(call Conv_$(strip $2),$(strip $1),$(strip $3)))
56
57 ################################################################################
58 # Conv_<aspect> implementations
59
60 # Return a single letter representing the type (lowercase first letter)
61 Conv_x = \
|