author | brutisso |
Fri, 25 May 2012 22:35:13 +0200 | |
changeset 12779 | 06778de5193e |
parent 12317 | 9670c1610c53 |
child 12892 | 3ef14bab6254 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# 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
|
6 |
# 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
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# 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
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# 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
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# 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
|
18 |
# 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
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# 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
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
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 |
default: all |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
include $(SPEC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
include MakeBase.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
include JavaCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
include NativeCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
# Setup the java compilers for the JDK build. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
34 |
include Setup.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
# Append demo goals to this variable. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
37 |
BUILD_DEMOS= |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
38 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
39 |
# The demo structure and contents should really be cleaned up. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
40 |
# Now every other demo has its own quirks where to put the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
41 |
# READMEs and other files. |
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 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
44 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
45 |
define SetupAppletDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
46 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
47 |
SETUP:=GENERATE_USINGJDKBYTECODE$2,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
48 |
SRC:=$(JDK_TOPDIR)/src/$3share/demo/applets/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
49 |
BIN:=$(JDK_OUTPUTDIR)/newdemo/applets/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
50 |
COPY:=.html .java .xyz .obj .au .gif)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
51 |
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
52 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
53 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
54 |
$(eval $(call SetupAppletDemo,ArcTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
55 |
$(eval $(call SetupAppletDemo,BarChart)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
56 |
$(eval $(call SetupAppletDemo,Blink)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
57 |
$(eval $(call SetupAppletDemo,CardTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
58 |
$(eval $(call SetupAppletDemo,Clock)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
59 |
$(eval $(call SetupAppletDemo,DitherTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
60 |
$(eval $(call SetupAppletDemo,DrawTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
61 |
$(eval $(call SetupAppletDemo,Fractal)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
62 |
$(eval $(call SetupAppletDemo,GraphicsTest)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
63 |
$(eval $(call SetupAppletDemo,MoleculeViewer)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
64 |
$(eval $(call SetupAppletDemo,NervousText)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
65 |
$(eval $(call SetupAppletDemo,SimpleGraph)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
66 |
$(eval $(call SetupAppletDemo,SortDemo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
67 |
$(eval $(call SetupAppletDemo,SpreadSheet)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
68 |
# Build WireFrame without a server since it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
69 |
# has a class Matrix3D that also exists in MoleculeViewer. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
70 |
$(eval $(call SetupAppletDemo,WireFrame,_NOSERV)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
71 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
72 |
ifndef OPENJDK |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
$(eval $(call SetupAppletDemo,Animator,,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
74 |
$(eval $(call SetupAppletDemo,GraphLayout,_NOSERV,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
75 |
$(eval $(call SetupAppletDemo,JumpingBox,,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
$(eval $(call SetupAppletDemo,TicTacToe,,closed/)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
79 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
81 |
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
|
82 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |
define SetupDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
84 |
# Param 1 = Name of the demo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
85 |
# Param 2 = Subdirectory of the demo below the demo directory. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
86 |
# Param 3 = Additional javac flags. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
87 |
# Param 4 = The main class for the jar. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
88 |
# Param 5 = Additional source directory. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
89 |
# Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
# Param 7 = List of files to copy |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
# Param 8 = Base name of jar file. Defaults to $1 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
92 |
# Param 9 = Exclude list |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
93 |
# Param 10 = Extra copy patterns |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
94 |
# Param 11 = Extra manifest attribute |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
95 |
# Param 12 = Suffix for compiler setup name |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
96 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
97 |
# In some demos the source is found in a subdir called src. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
98 |
$1_MAIN_SRC:=$$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
99 |
ifeq ($$($1_MAIN_SRC),) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
100 |
$1_MAIN_SRC:=$(JDK_TOPDIR)/src/$6share/demo/$2/$1 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
101 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
102 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
103 |
ifneq ($8,) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
104 |
$1_JARFILE := $8.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
105 |
else |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
106 |
$1_JARFILE := $1.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
107 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
108 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
109 |
# Compile java classes if there are any. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
110 |
$1_JAVA_FILES_EXIST := $$(shell $$(FIND) $$($1_MAIN_SRC) -name "*.java") |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
112 |
ifneq ($$($1_JAVA_FILES_EXIST),) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
113 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
114 |
SETUP:=GENERATE_USINGJDKBYTECODE$(12),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
ADD_JAVAC_FLAGS:=$3,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
SRC:=$$($1_MAIN_SRC) $5,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/$2/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
118 |
COPY:=$(PATTERNS_TO_COPY) $(10),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
119 |
JAR:=$(JDK_OUTPUTDIR)/newdemo/$2/$1/$$($1_JARFILE),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
120 |
JARMAIN:=$4,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
121 |
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
122 |
EXTRA_MANIFEST_ATTR:=$(11),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
123 |
SRCZIP:=$(JDK_OUTPUTDIR)/newdemo/$2/$1/src.zip,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
124 |
EXCLUDE_FILES:=$9)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
125 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
126 |
BUILD_DEMOS += $$(BUILD_DEMO_$1) \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
127 |
$(JDK_OUTPUTDIR)/newdemo/$2/$1/$$($1_JARFILE) \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
128 |
$(JDK_OUTPUTDIR)/newdemo/$2/$1/src.zip |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
129 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
130 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
131 |
# Copy files. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
$1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
133 |
$(JDK_OUTPUTDIR)/newdemo/$2/$1/%,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
134 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7))) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
135 |
ifneq ($7,) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
136 |
$(JDK_OUTPUTDIR)/newdemo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/% |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
137 |
mkdir -p $$(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
138 |
cp $$< $$@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
139 |
chmod -f ug+w $$@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
140 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
141 |
BUILD_DEMOS += $$($1_COPY_TARGETS) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
142 |
endif |
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)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
147 |
$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services : \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
148 |
$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
149 |
$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
150 |
(cd $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
151 |
$(MKDIR) -p _the.tmp/META-INF/services && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
152 |
$(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
|
153 |
cd _the.tmp && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
154 |
$(JAR) uf $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
155 |
cd META-INF/services && \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
156 |
$(JAR) uf $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
157 |
$(RM) -r $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.tmp |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
158 |
touch $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
159 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
160 |
BUILD_DEMOS+=$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
161 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
162 |
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
163 |
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
164 |
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
165 |
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
166 |
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
168 |
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
169 |
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
170 |
$(eval $(call SetupDemo,jconsole-plugin,scripting,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,,,,*.xml *.txt)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
171 |
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
172 |
$(eval $(call SetupDemo,JTop,management,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,JTop,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
174 |
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
175 |
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
176 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
177 |
ifndef OPENJDK |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
179 |
$(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) |
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 |
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
182 |
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
183 |
$(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
|
184 |
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
185 |
SplashScreen-Image: resources/images/splash.png,_NOSERV)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
186 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
187 |
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
188 |
$(JDK_OUTPUTDIR)/newdemo/nbproject/%,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/demo/nbproject/ -type f)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
190 |
$(JDK_OUTPUTDIR)/newdemo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
191 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
192 |
cp $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
193 |
chmod -f ug+w $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
194 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
195 |
|
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 |
# Why do we install a demo jar into the main jre/lib/ext???????????????? |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
199 |
$(JDK_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/newdemo/nio/zipfs/zipfs.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
200 |
$(MKDIR) -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
201 |
$(CP) $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
202 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
203 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/lib/ext/zipfs.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
204 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
205 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
206 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
207 |
# In the old makefiles, j2dbench was not compiled. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
208 |
#$(eval $(call SetupDemo,J2DBench,java2d,/src,,j2dbench/J2DBench)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
209 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
210 |
define SetupJVMTIDemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
211 |
# Param 1 = Name of the demo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
212 |
# Param 2 = add these directories to the includes, default is agent_util |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
213 |
# Param 3 = extra CFLAGS |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
214 |
# Param 4 = C or C++ (defaults to C) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
215 |
# Param 5 = libs for posix |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
216 |
# Param 6 = libs for winapi |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
217 |
# Param 7 = libs for solaris |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
218 |
BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= $$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/$1) \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
219 |
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2)) |
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 |
BUILD_DEMO_JVMTI_$1_O_FLAG:=$(C_O_FLAG_NORM) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
223 |
ifneq (,$4) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
224 |
BUILD_DEMO_JVMTI_$1_LANG:=$4 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
225 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
226 |
ifeq (C++,$4) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
227 |
$1_EXTRA_CXX:=$(LIBCXX) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
228 |
BUILD_DEMO_JVMTI_$1_O_FLAG:=$(CXX_O_FLAG_NORM) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
229 |
endif |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
230 |
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
231 |
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
|
232 |
LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
233 |
CFLAGS:=$(CFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
234 |
LDFLAGS:=$(LDFLAGS_JDKLIB),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
235 |
LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
236 |
LDFLAGS_SUFFIX_posix:=$5,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
237 |
LDFLAGS_SUFFIX_winapi:=$6,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
238 |
LDFLAGS_SUFFIX_solaris:=-lc $7,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
239 |
BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
240 |
LIB:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX))) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
241 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
242 |
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
243 |
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
|
244 |
ZIP:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
245 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
246 |
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
247 |
$(MKDIR) -p $$(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
248 |
$(CP) $$< $$@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
249 |
$(CHMOD) -f ug+w $$@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
250 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
251 |
ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
252 |
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
253 |
SETUP:=GENERATE_USINGJDKBYTECODE,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
254 |
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
255 |
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/jvmti/$1,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
256 |
COPY:=$(PATTERNS_TO_COPY),\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
257 |
JAR:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
258 |
JARMAIN:=,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
259 |
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
260 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
261 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
262 |
endif |
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 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX) \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
265 |
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
266 |
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
267 |
endef |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
268 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
269 |
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
270 |
$(eval $(call SetupJVMTIDemo,gctest, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
271 |
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
272 |
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
273 |
# hprof contains error messages using __FILE__ macro. These expand to the absolute path |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
274 |
# in the new build system and relative in the old, causing the binaries to differ. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
275 |
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
276 |
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,C,\ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
277 |
-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
278 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
279 |
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
280 |
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
281 |
$(eval $(call SetupJVMTIDemo,waiters, agent_util,,C++)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
282 |
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
283 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
284 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
285 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
286 |
# 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
|
287 |
# At least, we do not need to compile the jpda demo, just jar/zip up the sources. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
288 |
JPDA_SOURCES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example -type f) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
289 |
# 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
|
290 |
JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
291 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
292 |
$(JDK_OUTPUTDIR)/newdemo/jpda/src.zip : $(JPDA_SOURCES) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
293 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
294 |
(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*") |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
295 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
296 |
$(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar : $(JPDA_SOURCES) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
297 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
298 |
$(RM) $(@D)/_the.sources |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
299 |
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
300 |
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
301 |
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
302 |
$(ECHO) "Main-Class: " >> $(@D)/_the.manifest |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
303 |
(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
304 |
(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
305 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
306 |
$(JDK_OUTPUTDIR)/newdemo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
307 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
308 |
$(CP) $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
309 |
$(CHMOD) -f ug+w $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
310 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
311 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jpda/src.zip $(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
312 |
$(JDK_OUTPUTDIR)/newdemo/jpda/com/sun/tools/example/README |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
313 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
314 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
315 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
316 |
$(JDK_OUTPUTDIR)/newdemo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
317 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
318 |
$(CP) $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
319 |
$(CHMOD) -f ug+w $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
320 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
321 |
$(JDK_OUTPUTDIR)/newdemo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
322 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
323 |
$(CP) $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
324 |
$(CHMOD) -f ug+w $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
325 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
326 |
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/management/index.html \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
327 |
$(JDK_OUTPUTDIR)/newdemo/jvmti/index.html |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
328 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
329 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
330 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
331 |
# The netbeans project files are copied into the demo directory. |
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 |
NETBEANS_DEMO_PROJECTS_FILES=$(shell $(FIND) $(JDK_TOPDIR)/src/share/demo/nbproject -type f) |
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 |
$(JDK_OUTPUTDIR)/newdemo/_the.nbproject: $(NETBEANS_DEMO_PROJECTS_FILES) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
336 |
$(MKDIR) -p $(JDK_OUTPUTDIR)/newdemo |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
337 |
$(RM) -rf $(JDK_OUTPUTDIR)/newdemo/nbproject |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
338 |
echo Copying Netbeans demo projects |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
339 |
(cd $(JDK_TOPDIR)/src/share/demo && cp -r nbproject $(JDK_OUTPUTDIR)/newdemo) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
340 |
touch $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
341 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
342 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
343 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
344 |
$(JDK_OUTPUTDIR)/newdemo/README : $(JDK_TOPDIR)/src/share/demo/README |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
345 |
mkdir -p $(@D) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
346 |
cp $< $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
347 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
348 |
################################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
349 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
350 |
all: $(BUILD_DEMOS) $(JDK_OUTPUTDIR)/newdemo/_the.nbproject $(JDK_OUTPUTDIR)/newdemo/README |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
351 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
352 |
.PHONY: all |