author | ykantser |
Mon, 07 Apr 2014 16:13:43 +0200 | |
changeset 23726 | 2f18b12acbdf |
parent 22606 | 9c09d5a52807 |
child 23925 | 0d5f2d863262 |
permissions | -rw-r--r-- |
17428 | 1 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# |
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
3 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
12317
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. |
20547 | 38 |
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src)) |
15126
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. |
20547 | 41 |
BUILD_DEMOS = |
12317
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 |
20547 | 50 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \ |
51 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
52 |
SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \ |
|
53 |
BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \ |
|
54 |
COPY := .html .java .xyz .obj .au .gif, \ |
|
55 |
DISABLE_SJAVAC := $2)) |
|
56 |
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) |
|
12317
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 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
59 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
60 |
$(eval $(call SetupAppletDemo,ArcTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
61 |
$(eval $(call SetupAppletDemo,BarChart)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
62 |
$(eval $(call SetupAppletDemo,Blink)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
63 |
$(eval $(call SetupAppletDemo,CardTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
64 |
$(eval $(call SetupAppletDemo,Clock)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
65 |
$(eval $(call SetupAppletDemo,DitherTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
66 |
$(eval $(call SetupAppletDemo,DrawTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
67 |
$(eval $(call SetupAppletDemo,Fractal)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
68 |
$(eval $(call SetupAppletDemo,GraphicsTest)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
69 |
$(eval $(call SetupAppletDemo,NervousText)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
70 |
$(eval $(call SetupAppletDemo,SimpleGraph)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
71 |
$(eval $(call SetupAppletDemo,SortDemo)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
72 |
$(eval $(call SetupAppletDemo,SpreadSheet)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
74 |
ifndef OPENJDK |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
75 |
$(eval $(call SetupAppletDemo,Animator,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
76 |
$(eval $(call SetupAppletDemo,GraphLayout,true,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
77 |
$(eval $(call SetupAppletDemo,JumpingBox,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
78 |
$(eval $(call SetupAppletDemo,TicTacToe,,closed/)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
79 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
81 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
82 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |
|
20547 | 84 |
PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj |
12317
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 |
define SetupDemo |
20547 | 87 |
# Param 1 = Name of the demo |
88 |
# Param 2 = Subdirectory of the demo below the demo directory. |
|
89 |
# Param 3 = Additional javac flags. |
|
90 |
# Param 4 = The main class for the jar. |
|
91 |
# Param 5 = Additional source directory. |
|
92 |
# Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) |
|
93 |
# Param 7 = List of files to copy |
|
94 |
# Param 8 = Base name of jar file. Defaults to $1 |
|
95 |
# Param 9 = Exclude list |
|
96 |
# Param 10 = Extra copy patterns |
|
97 |
# Param 11 = Extra manifest attribute |
|
98 |
# Param 12 = Suffix for compiler setup name |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
99 |
|
20547 | 100 |
# In some demos the source is found in a subdir called src. |
101 |
$1_MAIN_SRC := $$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src) |
|
102 |
ifeq ($$($1_MAIN_SRC), ) |
|
103 |
$1_MAIN_SRC := $(JDK_TOPDIR)/src/$6share/demo/$2/$1 |
|
104 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
105 |
|
20547 | 106 |
ifneq ($8, ) |
107 |
$1_JARFILE := $8.jar |
|
108 |
else |
|
109 |
$1_JARFILE := $1.jar |
|
110 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
|
20547 | 112 |
ifeq ($(findstring $1,Laffy SwingSet3), ) |
113 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \ |
|
114 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
115 |
ADD_JAVAC_FLAGS := $3, \ |
|
116 |
SRC := $$($1_MAIN_SRC) $5, \ |
|
117 |
BIN := $(JDK_OUTPUTDIR)/democlasses/$2/$1, \ |
|
118 |
COPY := $(PATTERNS_TO_COPY) $(10), \ |
|
119 |
JAR := $(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE), \ |
|
120 |
JARMAIN := $4, \ |
|
21805 | 121 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ |
20547 | 122 |
EXTRA_MANIFEST_ATTR := $(11), \ |
123 |
SRCZIP := $(JDK_OUTPUTDIR)/demo/$2/$1/src.zip, \ |
|
124 |
EXCLUDE_FILES := $9, \ |
|
125 |
DISABLE_SJAVAC := $(12))) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
126 |
|
20547 | 127 |
BUILD_DEMOS += $$(BUILD_DEMO_$1) \ |
128 |
$(JDK_OUTPUTDIR)/demo/$2/$1/$$($1_JARFILE) \ |
|
129 |
$(JDK_OUTPUTDIR)/demo/$2/$1/src.zip |
|
130 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
131 |
|
20547 | 132 |
# Copy files. |
133 |
$1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%, \ |
|
134 |
$(JDK_OUTPUTDIR)/demo/$2/$1/%, \ |
|
135 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/, $7))) |
|
136 |
ifneq ($7, ) |
|
137 |
$(JDK_OUTPUTDIR)/demo/$2/$1/%: $(JDK_TOPDIR)/src/$6share/demo/$2/$1/% |
|
138 |
$$(call install-file) |
|
139 |
$(CHMOD) -f ug+w $$@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
140 |
|
20547 | 141 |
BUILD_DEMOS += $$($1_COPY_TARGETS) |
142 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
143 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
144 |
endef |
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 |
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html)) |
20547 | 147 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \ |
148 |
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \ |
|
149 |
$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor |
|
13702 | 150 |
(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \ |
20547 | 151 |
$(MKDIR) -p _the.tmp/META-INF/services && \ |
152 |
$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \ |
|
153 |
cd _the.tmp && \ |
|
154 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ |
|
155 |
cd META-INF/services && \ |
|
156 |
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) |
|
13702 | 157 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp |
12892 | 158 |
$(TOUCH) $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
159 |
|
20547 | 160 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
161 |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
162 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
163 |
$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
164 |
$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
165 |
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html)) |
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
166 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
168 |
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
169 |
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
170 |
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
171 |
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
172 |
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
$(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
|
174 |
$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
175 |
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) |
14521
6196ce8b0c33
8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents:
14231
diff
changeset
|
176 |
$(eval $(call SetupDemo,JTop,management,,JTop,,,README*)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
177 |
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) |
12892 | 179 |
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
180 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
181 |
ifndef OPENJDK |
20547 | 182 |
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) |
183 |
$(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
184 |
|
20547 | 185 |
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo)) |
186 |
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \ |
|
21742
e61b55843e88
8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents:
21535
diff
changeset
|
187 |
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt)) |
20547 | 188 |
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \ |
189 |
SplashScreen-Image: resources/images/splash.png,true)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
190 |
|
20547 | 191 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \ |
192 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
|
193 |
$(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject)) |
|
194 |
||
195 |
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% |
|
196 |
$(call install-file) |
|
197 |
$(CHMOD) -f ug+w $@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
198 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
199 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
200 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
201 |
|
20547 | 202 |
# In the old makefiles, j2dbench was not compiled. |
203 |
#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
204 |
|
13702 | 205 |
# JVMTI demos are a bit strange and share some files, but be careful the |
20547 | 206 |
# shared files are just the *.c and *.h files, not the README or sample |
207 |
# makefiles. So we always exclude the README.txt and sample.makefile.txt |
|
208 |
# from the extra sources. |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
209 |
define SetupJVMTIDemo |
20547 | 210 |
# Param 1 = Name of the demo |
211 |
# Param 2 = add these directories to the includes, default is agent_util |
|
212 |
# Param 3 = extra CFLAGS |
|
213 |
# Param 4 = C or C++ (defaults to C) |
|
214 |
# Param 5 = libs for posix |
|
215 |
# Param 6 = libs for windows |
|
216 |
# Param 7 = libs for solaris |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
217 |
# Param 8 = libs for linux |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
218 |
# Param 9 = extra directories with required sources |
20547 | 219 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \ |
220 |
$$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \ |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
221 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)) \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
222 |
$9 |
20547 | 223 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \ |
224 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/README.txt) \ |
|
225 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/sample.makefile.txt) |
|
226 |
BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC)) |
|
227 |
BUILD_DEMO_JVMTI_$1_LANG := C |
|
228 |
ifneq (, $4) |
|
229 |
BUILD_DEMO_JVMTI_$1_LANG := $4 |
|
230 |
endif |
|
231 |
ifeq (C++, $4) |
|
232 |
$1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX) |
|
233 |
endif |
|
13164 | 234 |
|
20547 | 235 |
$1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \ |
236 |
$$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \ |
|
237 |
$(CXXFLAGS_DEBUG_SYMBOLS) |
|
238 |
ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc) |
|
239 |
$1_FILTER := -xregs=no%appl |
|
240 |
$1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS)) |
|
241 |
endif |
|
13164 | 242 |
|
20547 | 243 |
# Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the |
244 |
# eval call below, the comma gets expanded too early. |
|
245 |
BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \ |
|
246 |
-I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 |
|
13702 | 247 |
|
20547 | 248 |
# Remove the -incremental:no setting to get .ilk-files like in the old build. |
249 |
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \ |
|
250 |
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \ |
|
251 |
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \ |
|
252 |
OPTIMIZATION := LOW, \ |
|
253 |
CXXFLAGS := $$($1_CXXFLAGS), \ |
|
254 |
LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \ |
|
255 |
LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \ |
|
256 |
LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \ |
|
257 |
LDFLAGS_SUFFIX_posix := $5, \ |
|
258 |
LDFLAGS_SUFFIX_windows := $6, \ |
|
259 |
LDFLAGS_SUFFIX_solaris := $7 -lc, \ |
|
260 |
LDFLAGS_SUFFIX_linux := $8, \ |
|
261 |
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ |
|
262 |
RC_FLAGS := $$(RC_FLAGS) \ |
|
263 |
-D "JDK_FNAME=$1.dll" \ |
|
264 |
-D "JDK_INTERNAL_NAME=$1" \ |
|
265 |
-D "JDK_FTYPE=0x2L", \ |
|
266 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1, \ |
|
267 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib, \ |
|
268 |
LIBRARY := $1)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
269 |
|
20547 | 270 |
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \ |
271 |
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \ |
|
272 |
EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \ |
|
273 |
ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
274 |
|
20547 | 275 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt |
276 |
$$(call install-file) |
|
277 |
$(CHMOD) -f ug+w $$@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
278 |
|
20547 | 279 |
ifneq (, $$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java)) |
280 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \ |
|
281 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
282 |
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1, \ |
|
283 |
BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \ |
|
284 |
COPY := $(PATTERNS_TO_COPY), \ |
|
285 |
JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \ |
|
286 |
EXTRA_MANIFEST_ATTR := Main-Class: \n, \ |
|
21805 | 287 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
288 |
|
20547 | 289 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar |
290 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
291 |
|
20547 | 292 |
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \ |
293 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip \ |
|
294 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt |
|
13702 | 295 |
|
20547 | 296 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
297 |
# These files normally end up in OBJECT_DIR but for demos they |
|
298 |
# are supposed to be included in the distro. |
|
299 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1) |
|
300 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.lib $$@ |
|
13702 | 301 |
|
20547 | 302 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1) |
303 |
$(CP) $(JDK_OUTPUTDIR)/demoobjs/jvmti/$1/$1.exp $$@ |
|
13702 | 304 |
|
20547 | 305 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.lib \ |
306 |
$(JDK_OUTPUTDIR)/demo/jvmti/$1/lib/$1.exp |
|
307 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
308 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
309 |
|
20547 | 310 |
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) |
311 |
$(eval $(call SetupJVMTIDemo,gctest, agent_util)) |
|
312 |
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) |
|
313 |
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) |
|
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
314 |
|
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
315 |
# On AIX, hprof requires 'dladdr' from src/aix/porting/porting_aix.cpp |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
316 |
BUILD_LIBHPROF_AIX_EXTRA_SRC := |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
317 |
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS := |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
318 |
ifeq ($(OPENJDK_TARGET_OS), aix) |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
319 |
BUILD_LIBHPROF_AIX_EXTRA_SRC += $(JDK_TOPDIR)/src/aix/porting |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
320 |
BUILD_LIBHPROF_AIX_EXTRA_CFLAGS += -I$(JDK_TOPDIR)/src/aix/porting |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
321 |
endif |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
322 |
|
20547 | 323 |
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \ |
22597
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
324 |
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
325 |
$(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \ |
7515a991bb37
8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents:
21535
diff
changeset
|
326 |
-ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC))) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
327 |
|
20547 | 328 |
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) |
329 |
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) |
|
330 |
$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++)) |
|
331 |
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
332 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
333 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
334 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
335 |
# 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
|
336 |
# At least, we do not need to compile the jpda demo, just jar/zip up the sources. |
20547 | 337 |
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
|
338 |
# The number of files are few enough so that we can use echo safely below to list them. |
20547 | 339 |
JPDA_FILES := $(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES)) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
340 |
|
20547 | 341 |
$(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
|
342 |
$(MKDIR) -p $(@D) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
343 |
(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
|
344 |
|
20547 | 345 |
$(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
|
346 |
$(MKDIR) -p $(@D) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
347 |
$(RM) $(@D)/_the.sources |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
348 |
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources) |
20547 | 349 |
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ |
21805 | 350 |
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf > $(@D)/_the.manifest |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
351 |
$(ECHO) "Main-Class: " >> $(@D)/_the.manifest |
20547 | 352 |
(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
353 |
(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
|
354 |
|
20547 | 355 |
$(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
|
356 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
357 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
358 |
|
13702 | 359 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \ |
20547 | 360 |
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
361 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
362 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
363 |
|
20547 | 364 |
$(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
|
365 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
366 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
367 |
|
20547 | 368 |
$(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
|
369 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
370 |
$(CHMOD) -f ug+w $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
371 |
|
13702 | 372 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \ |
20547 | 373 |
$(JDK_OUTPUTDIR)/demo/jvmti/index.html |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
374 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
375 |
################################################################################################## |
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 |
# The netbeans project files are copied into the demo directory. |
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
378 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
379 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \ |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
380 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
381 |
$(filter-out $(JDK_TOPDIR)/src/share/demo/nbproject/jfc/SwingApplet%, \ |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
382 |
$(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject))) |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
383 |
else |
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
384 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \ |
20547 | 385 |
$(JDK_OUTPUTDIR)/demo/nbproject/%, \ |
386 |
$(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject)) |
|
22067
3623b46a325d
8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents:
21854
diff
changeset
|
387 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
388 |
|
20547 | 389 |
$(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
|
390 |
$(call install-file) |
12892 | 391 |
$(CHMOD) -f ug+w $@ |
392 |
||
393 |
################################################################################################## |
|
394 |
||
13702 | 395 |
$(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
|
396 |
$(call install-file) |
12892 | 397 |
|
13702 | 398 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
399 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
400 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
401 |
|
13164 | 402 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 403 |
|
20547 | 404 |
$(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
|
405 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
406 |
$(CHMOD) -f ug+w $@ |
12892 | 407 |
|
20547 | 408 |
$(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
|
409 |
$(call install-file) |
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
15676
diff
changeset
|
410 |
$(CHMOD) -f ug+w $@ |
12892 | 411 |
|
20547 | 412 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar: \ |
413 |
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/README.txt $(JDK_OUTPUTDIR)/democlasses/jni/Poller/Poller.c |
|
12892 | 414 |
|
20547 | 415 |
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \ |
416 |
SETUP := GENERATE_USINGJDKBYTECODE, \ |
|
417 |
SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \ |
|
418 |
BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
419 |
HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
420 |
JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \ |
|
21805 | 421 |
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ |
20547 | 422 |
SRCZIP := $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip, \ |
423 |
COPY := README.txt Poller.c, \ |
|
424 |
JARMAIN := Client)) |
|
12892 | 425 |
|
426 |
||
427 |
||
20547 | 428 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar $(JDK_OUTPUTDIR)/demo/jni/Poller/src.zip \ |
429 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt |
|
12892 | 430 |
|
20547 | 431 |
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \ |
432 |
SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \ |
|
433 |
LANG := C, \ |
|
434 |
OPTIMIZATION := LOW, \ |
|
435 |
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \ |
|
436 |
-I$(JDK_OUTPUTDIR)/democlasses/jni/Poller, \ |
|
437 |
LDFLAGS := $(LDFLAGS_JDKLIB), \ |
|
438 |
LDFLAGS_SUFFIX_solaris := -lc, \ |
|
439 |
OBJECT_DIR := $(JDK_OUTPUTDIR)/demoobjs/jni/Poller, \ |
|
440 |
OUTPUT_DIR := $(JDK_OUTPUTDIR)/demoobjs, \ |
|
441 |
LIBRARY := Poller)) |
|
12892 | 442 |
|
20547 | 443 |
# |
444 |
# We can only compile native code after jar has been build (since we depend on generated .h files) |
|
445 |
# |
|
446 |
$(JDK_OUTPUTDIR)/demoobjs/jni/Poller/Poller.o: $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar |
|
12892 | 447 |
|
20547 | 448 |
$(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \ |
449 |
$(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
|
450 |
$(call install-file) |
12892 | 451 |
|
20547 | 452 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX) |
12892 | 453 |
|
454 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
455 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
456 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
457 |
|
12892 | 458 |
ifndef OPENJDK |
20547 | 459 |
DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip) |
12892 | 460 |
|
20547 | 461 |
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE) |
12892 | 462 |
$(MKDIR) -p $(@D) |
13702 | 463 |
$(RM) -r $(JDK_OUTPUTDIR)/demo/db $(JDK_OUTPUTDIR)/demo/demo |
14231 | 464 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(UNZIP) -q -o $< |
17428 | 465 |
$(MV) $(JDK_OUTPUTDIR)/demo/db-derby-*-bin/demo $(JDK_OUTPUTDIR)/demo/db |
466 |
$(CD) $(JDK_OUTPUTDIR)/demo && $(RM) -r db-derby-*-bin |
|
12892 | 467 |
$(TOUCH) $@ |
468 |
||
20547 | 469 |
# Copy this after the unzip above to avoid race with directory creation and mv command. |
470 |
$(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \ |
|
471 |
$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \ |
|
472 |
| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped |
|
17428 | 473 |
$(MKDIR) -p $(@D) |
474 |
$(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
|
475 |
|
20547 | 476 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html |
12892 | 477 |
endif |
478 |
||
479 |
################################################################################################## |
|
480 |
||
481 |
all: $(BUILD_DEMOS) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
482 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
483 |
.PHONY: all |