author | katleman |
Thu, 13 Jun 2013 09:48:22 -0700 | |
changeset 18035 | 0664c494ac98 |
parent 17428 | 5c68e5cbfde0 |
child 20116 | af846cd89e6b |
permissions | -rw-r--r-- |
17428 | 1 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
26 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
default: all |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
include $(SPEC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
include MakeBase.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
include JavaCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
include NativeCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
34 |
# Setup the java compilers for the JDK build. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
include Setup.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
37 |
# Prepare the find cache. Only used if running on windows. |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
38 |
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src)) |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
39 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
40 |
# Append demo goals to this variable. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
41 |
BUILD_DEMOS= |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
42 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
43 |
# The demo structure and contents should really be cleaned up. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
44 |
# Now every other demo has its own quirks where to put the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
45 |
# READMEs and other files. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
46 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
47 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
48 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
49 |
define SetupAppletDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
50 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1,\ |
13702 | 51 |
SETUP:=GENERATE_USINGJDKBYTECODE,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
52 |
SRC:=$(JDK_TOPDIR)/src/$3share/demo/applets/$1,\ |
13702 | 53 |
BIN:=$(JDK_OUTPUTDIR)/demo/applets/$1,\ |
54 |
COPY:=.html .java .xyz .obj .au .gif,\ |
|
55 |
DISABLE_SJAVAC:=$2)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
56 |
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
57 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
58 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
59 |
$(eval $(call SetupAppletDemo,ArcTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
60 |
$(eval $(call SetupAppletDemo,BarChart)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
61 |
$(eval $(call SetupAppletDemo,Blink)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
62 |
$(eval $(call SetupAppletDemo,CardTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
63 |
$(eval $(call SetupAppletDemo,Clock)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
64 |
$(eval $(call SetupAppletDemo,DitherTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
65 |
$(eval $(call SetupAppletDemo,DrawTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
66 |
$(eval $(call SetupAppletDemo,Fractal)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
67 |
$(eval $(call SetupAppletDemo,GraphicsTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
68 |
$(eval $(call SetupAppletDemo,MoleculeViewer)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
69 |
$(eval $(call SetupAppletDemo,NervousText)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
70 |
$(eval $(call SetupAppletDemo,SimpleGraph)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
71 |
$(eval $(call SetupAppletDemo,SortDemo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
72 |
$(eval $(call SetupAppletDemo,SpreadSheet)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
# Build WireFrame without a server since it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
74 |
# has a class Matrix3D that also exists in MoleculeViewer. |
13702 | 75 |
$(eval $(call SetupAppletDemo,WireFrame,true)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
ifndef OPENJDK |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
$(eval $(call SetupAppletDemo,Animator,,closed/)) |
13702 | 79 |
$(eval $(call SetupAppletDemo,GraphLayout,true,closed/)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
$(eval $(call SetupAppletDemo,JumpingBox,,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
81 |
$(eval $(call SetupAppletDemo,TicTacToe,,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
82 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
84 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
85 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
86 |
PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
87 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
88 |
define SetupDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
89 |
# Param 1 = Name of the demo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
# Param 2 = Subdirectory of the demo below the demo directory. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
# Param 3 = Additional javac flags. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
92 |
# Param 4 = The main class for the jar. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
93 |
# Param 5 = Additional source directory. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
94 |
# Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
95 |
# Param 7 = List of files to copy |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
96 |
# Param 8 = Base name of jar file. Defaults to $1 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
97 |
# Param 9 = Exclude list |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
98 |
# Param 10 = Extra copy patterns |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
99 |
# Param 11 = Extra manifest attribute |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
100 |
# Param 12 = Suffix for compiler setup name |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
101 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
102 |
# In some demos the source is found in a subdir called src. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
103 |
$1_MAIN_SRC:=$$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
104 |
ifeq ($$($1_MAIN_SRC),) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
105 |
$1_MAIN_SRC:=$(JDK_TOPDIR)/src/$6share/demo/$2/$1 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
106 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
107 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
108 |
ifneq ($8,) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
109 |
$1_JARFILE := $8.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
110 |
else |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
$1_JARFILE := $1.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
112 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
113 |
|
14231 | 114 |
ifeq ($(findstring $1,Laffy SwingSet3),) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\ |
13702 | 116 |
SETUP:=GENERATE_USINGJDKBYTECODE,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
ADD_JAVAC_FLAGS:=$3,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
118 |
SRC:=$$($1_MAIN_SRC) $5,\ |
13702 | 119 |
BIN:=$(JDK_OUTPUTDIR)/democlasses/$2/$1,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
120 |
COPY:=$(PATTERNS_TO_COPY) $(10),\ |
13702 | 121 |
JAR:=$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE),\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
122 |
JARMAIN:=$4,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
123 |
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
124 |
EXTRA_MANIFEST_ATTR:=$(11),\ |
13702 | 125 |
SRCZIP:=$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip,\ |
126 |
EXCLUDE_FILES:=$9,\ |
|
127 |
DISABLE_SJAVAC:=$(12))) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
128 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
129 |
BUILD_DEMOS += $$(BUILD_DEMO_$1) \ |
13702 | 130 |
$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \ |
131 |
$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
133 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
134 |
# Copy files. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
135 |
$1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%,\ |
13702 | 136 |
$(JDK_OUTPUTDIR)/demo/$2/$1/%,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
137 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7))) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
138 |
ifneq ($7,) |
13702 | 139 |
$(JDK_OUTPUTDIR)/demo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
140 |
$$(call install-file) |
12892 | 141 |
$(CHMOD) -f ug+w $$@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
142 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
143 |
BUILD_DEMOS += $$($1_COPY_TARGETS) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
144 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
145 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
146 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
147 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
148 |
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html)) |
13702 | 149 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services : \ |
150 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
151 |
$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor |
13702 | 152 |
(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
153 |
$(MKDIR) -p _the.tmp/META-INF/services && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
154 |
$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
155 |
cd _the.tmp && \ |
13702 | 156 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
157 |
cd META-INF/services && \ |
13702 | 158 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) |
159 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp |
|
12892 | 160 |
$(TOUCH) $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
161 |
|
13702 | 162 |
BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
163 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
164 |
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
165 |
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
166 |
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
168 |
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
169 |
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
170 |
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
171 |
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*)) |
14521
6196ce8b0c33
8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents:
14231
diff
changeset
|
172 |
$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) |
14521
6196ce8b0c33
8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents:
14231
diff
changeset
|
174 |
$(eval $(call SetupDemo,JTop,management,,JTop,,,README*)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
175 |
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
176 |
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) |
12892 | 177 |
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
179 |
ifndef OPENJDK |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
180 |
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
181 |
$(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
182 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
183 |
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
184 |
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
185 |
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
186 |
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT,\ |
13702 | 187 |
SplashScreen-Image: resources/images/splash.png,true)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
188 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\ |
13702 | 190 |
$(JDK_OUTPUTDIR)/demo/nbproject/%,\ |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
191 |
$(call CacheFind,$(JDK_TOPDIR)/src/closed/share/demo/nbproject)) |
13702 | 192 |
$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
193 |
$(call install-file) |
12892 | 194 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
195 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
196 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
197 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
198 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
199 |
# In the old makefiles, j2dbench was not compiled. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
200 |
#$(eval $(call SetupDemo,J2DBench,java2d,/src,,j2dbench/J2DBench)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
201 |
|
13702 | 202 |
# JVMTI demos are a bit strange and share some files, but be careful the |
203 |
# shared files are just the *.c and *.h files, not the README or sample |
|
204 |
# makefiles. So we always exclude the README.txt and sample.makefile.txt |
|
205 |
# from the extra sources. |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
206 |
define SetupJVMTIDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
207 |
# Param 1 = Name of the demo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
208 |
# Param 2 = add these directories to the includes, default is agent_util |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
209 |
# Param 3 = extra CFLAGS |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
210 |
# Param 4 = C or C++ (defaults to C) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
211 |
# Param 5 = libs for posix |
13702 | 212 |
# Param 6 = libs for windows |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
213 |
# Param 7 = libs for solaris |
13702 | 214 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= \ |
215 |
$$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \ |
|
216 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)) |
|
217 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE:= \ |
|
218 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/README.txt) \ |
|
219 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)/sample.makefile.txt) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
220 |
BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
221 |
BUILD_DEMO_JVMTI_$1_LANG:=C |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
222 |
ifneq (,$4) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
223 |
BUILD_DEMO_JVMTI_$1_LANG:=$4 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
224 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
225 |
ifeq (C++,$4) |
13702 | 226 |
$1_EXTRA_CXX:=$(LDFLAGS_CXX_JDK) $(LIBCXX) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
227 |
endif |
13164 | 228 |
|
13702 | 229 |
$1_CXXFLAGS:=$(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \ |
230 |
$$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \ |
|
231 |
$(CXXFLAGS_DEBUG_SYMBOLS) |
|
13164 | 232 |
ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH),waiters-sparc) |
13702 | 233 |
$1_FILTER:=-xregs=no%appl |
234 |
$1_CXXFLAGS:=$$(filter-out $$($1_FILTER),$$($1_CXXFLAGS)) |
|
13164 | 235 |
endif |
236 |
||
13702 | 237 |
# Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the |
238 |
# eval call below, the comma gets expanded too early. |
|
239 |
BUILD_DEMO_JVMTI_$1_CFLAGS:=$(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \ |
|
240 |
-I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 |
|
241 |
||
242 |
# Remove the -incremental:no setting to get .ilk-files like in the old build. |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
243 |
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
244 |
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
245 |
LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\ |
13702 | 246 |
OPTIMIZATION:=LOW,\ |
13164 | 247 |
CXXFLAGS:=$$($1_CXXFLAGS),\ |
13702 | 248 |
LDFLAGS:=$(filter-out -incremental:no -opt:ref,$(LDFLAGS_JDKLIB)),\ |
249 |
LDFLAGS_macosx:=$(call SET_EXECUTABLE_ORIGIN),\ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
250 |
LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
251 |
LDFLAGS_SUFFIX_posix:=$5,\ |
13702 | 252 |
LDFLAGS_SUFFIX_windows:=$6,\ |
253 |
LDFLAGS_SUFFIX_solaris:=$7 -lc,\ |
|
254 |
LDFLAGS_SUFFIX_linux:=$8,\ |
|
255 |
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ |
|
256 |
RC_FLAGS:=$$(RC_FLAGS) \ |
|
14231 | 257 |
-D "JDK_FNAME=$1.dll" \ |
258 |
-D "JDK_INTERNAL_NAME=$1" \ |
|
259 |
-D "JDK_FTYPE=0x2L",\ |
|
13702 | 260 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jvmti/$1,\ |
261 |
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib,\ |
|
13164 | 262 |
LIBRARY:=$1)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
263 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
264 |
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
265 |
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\ |
13702 | 266 |
EXCLUDE_FILES:=$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \ |
267 |
ZIP:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
268 |
|
13702 | 269 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
270 |
$$(call install-file) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
271 |
$(CHMOD) -f ug+w $$@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
272 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
273 |
ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
274 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
275 |
SETUP:=GENERATE_USINGJDKBYTECODE,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
276 |
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1,\ |
13702 | 277 |
BIN:=$(JDK_OUTPUTDIR)/democlasses/jvmti/$1,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
278 |
COPY:=$(PATTERNS_TO_COPY),\ |
13702 | 279 |
JAR:=$(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar,\ |
12892 | 280 |
EXTRA_MANIFEST_ATTR:=Main-Class: \n,\ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
281 |
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
282 |
|
13702 | 283 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
284 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
285 |
|
13164 | 286 |
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \ |
13702 | 287 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \ |
288 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt |
|
289 |
||
290 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
291 |
# These files normally end up in OBJECT_DIR but for demos they |
|
292 |
# are supposed to be included in the distro. |
|
293 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1) |
|
294 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@ |
|
295 |
||
296 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1) |
|
297 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@ |
|
298 |
||
299 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \ |
|
300 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp |
|
301 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
302 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
303 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
304 |
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
305 |
$(eval $(call SetupJVMTIDemo,gctest, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
306 |
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
307 |
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
308 |
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo,\ |
13702 | 309 |
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt,C,\ |
310 |
-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl,-lpthread)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
311 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
312 |
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
313 |
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
314 |
$(eval $(call SetupJVMTIDemo,waiters, agent_util,,C++)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
315 |
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
316 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
317 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
318 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
319 |
# The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
320 |
# At least, we do not need to compile the jpda demo, just jar/zip up the sources. |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
321 |
JPDA_SOURCES:=$(call CacheFind,$(JDK_TOPDIR)/src/share/classes/com/sun/tools/example) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
322 |
# The number of files are few enough so that we can use echo safely below to list them. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
323 |
JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
324 |
|
13702 | 325 |
$(JDK_OUTPUTDIR)/demo/jpda/src.zip : $(JPDA_SOURCES) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
326 |
$(MKDIR) -p $(@D) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
327 |
(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*") |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
328 |
|
13702 | 329 |
$(JDK_OUTPUTDIR)/demo/jpda/examples.jar : $(JPDA_SOURCES) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
330 |
$(MKDIR) -p $(@D) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
331 |
$(RM) $(@D)/_the.sources |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
332 |
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
333 |
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
334 |
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
335 |
$(ECHO) "Main-Class: " >> $(@D)/_the.manifest |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
336 |
(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
337 |
(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
338 |
|
13702 | 339 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
340 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
341 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
342 |
|
13702 | 343 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \ |
344 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
345 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
346 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
347 |
|
13702 | 348 |
$(JDK_OUTPUTDIR)/demo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
349 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
350 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
351 |
|
13702 | 352 |
$(JDK_OUTPUTDIR)/demo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
353 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
354 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
355 |
|
13702 | 356 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \ |
357 |
$(JDK_OUTPUTDIR)/demo/jvmti/index.html |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
358 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
359 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
360 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
361 |
# The netbeans project files are copied into the demo directory. |
12892 | 362 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%,\ |
13702 | 363 |
$(JDK_OUTPUTDIR)/demo/nbproject/%,\ |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
364 |
$(call CacheFind,$(JDK_TOPDIR)/src/share/demo/nbproject)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
365 |
|
13702 | 366 |
$(JDK_OUTPUTDIR)/demo/nbproject/% : $(JDK_TOPDIR)/src/share/demo/nbproject/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
367 |
$(call install-file) |
12892 | 368 |
$(CHMOD) -f ug+w $@ |
369 |
||
370 |
################################################################################################## |
|
371 |
||
13702 | 372 |
$(JDK_OUTPUTDIR)/demo/README: $(JDK_TOPDIR)/src/share/demo/README |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
373 |
$(call install-file) |
12892 | 374 |
|
13702 | 375 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
376 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
377 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
378 |
|
13164 | 379 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 380 |
|
13702 | 381 |
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/% |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
382 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
383 |
$(CHMOD) -f ug+w $@ |
12892 | 384 |
|
13702 | 385 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
386 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
387 |
$(CHMOD) -f ug+w $@ |
12892 | 388 |
|
13702 | 389 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar : \ |
390 |
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c |
|
12892 | 391 |
|
392 |
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR,\ |
|
393 |
SETUP:=GENERATE_USINGJDKBYTECODE, \ |
|
394 |
SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \ |
|
13702 | 395 |
BIN:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
396 |
HEADERS:=$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
397 |
JAR:=$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \ |
|
12892 | 398 |
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf, \ |
13702 | 399 |
SRCZIP:=$(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \ |
400 |
COPY:=README.txt Poller.c, \ |
|
401 |
JARMAIN:=Client)) |
|
12892 | 402 |
|
403 |
||
404 |
||
13702 | 405 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \ |
406 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt |
|
12892 | 407 |
|
408 |
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER,\ |
|
409 |
SRC:=$(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \ |
|
13702 | 410 |
LANG:=C,\ |
411 |
OPTIMIZATION:=LOW,\ |
|
412 |
CFLAGS:=$(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \ |
|
413 |
-I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
12892 | 414 |
LDFLAGS:=$(LDFLAGS_JDKLIB), \ |
15676
291a66e841c2
8008294: build-infra: Build-infra closed fails on solaris 11.1
erikj
parents:
15126
diff
changeset
|
415 |
LDFLAGS_SUFFIX_solaris:=-lc,\ |
13702 | 416 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/demoobjs/jni/Poller,\ |
417 |
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/demoobjs, \ |
|
13164 | 418 |
LIBRARY:=Poller)) |
12892 | 419 |
|
420 |
# |
|
421 |
# We can only compile native code after jar has been build (since we depend on generated .h files) |
|
422 |
# |
|
13702 | 423 |
$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o : $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar |
12892 | 424 |
|
13702 | 425 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) : \ |
426 |
$(JDK_OUTPUTDIR)/demoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
427 |
$(call install-file) |
12892 | 428 |
|
13702 | 429 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) |
12892 | 430 |
|
431 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
432 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
433 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
434 |
|
12892 | 435 |
ifndef OPENJDK |
17428 | 436 |
DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip) |
12892 | 437 |
|
13702 | 438 |
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE) |
12892 | 439 |
$(MKDIR) -p $(@D) |
13702 | 440 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo |
14231 | 441 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $< |
17428 | 442 |
$(MV) $(JDK_OUTPUTDIR)/demo/db-derby-*-bin/demo $(JDK_OUTPUTDIR)/demo/db |
443 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin |
|
12892 | 444 |
$(TOUCH) $@ |
445 |
||
446 |
# Copy this after the unzip above to avoid race with directory creation and mv command. |
|
13702 | 447 |
$(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \ |
12892 | 448 |
$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \ |
13702 | 449 |
| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped |
17428 | 450 |
$(MKDIR) -p $(@D) |
451 |
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
452 |
|
13702 | 453 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html |
12892 | 454 |
endif |
455 |
||
456 |
################################################################################################## |
|
457 |
||
458 |
all: $(BUILD_DEMOS) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
459 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
460 |
.PHONY: all |