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