jdk/make/CompileDemos.gmk
author redestad
Sun, 11 Dec 2016 12:20:45 +0100
changeset 42469 d1c0a9123f87
parent 41353 910288d26d83
child 44744 333a815987e2
permissions -rw-r--r--
8170595: Optimize Class.isAnonymousClass, isLocalClass, and isMemberClass Reviewed-by: mchung, darcy Contributed-by: claes.redestad@oracle.com, christoph.dreis@freenet.de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
41353
910288d26d83 8150736: Excessive disk space used by build system
erikj
parents: 35241
diff changeset
     2
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
12317
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
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    26
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    27
# Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    28
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    29
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    30
default: all
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
include $(SPEC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    33
include MakeBase.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    34
include JavaCompilation.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    35
include NativeCompilation.gmk
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    36
include SetupJavaCompilers.gmk
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    37
include TextFileProcessing.gmk
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    38
include ZipArchive.gmk
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    39
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    40
# Prepare the find cache.
35241
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 34695
diff changeset
    41
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/demo \
075bbb8f2423 8146403: Windows build can be faster
erikj
parents: 34695
diff changeset
    42
    $(JDK_TOPDIR)/src/*/demo)))
15126
bceb690ccf35 8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents: 14596
diff changeset
    43
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    44
# Append demo goals to this variable.
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    45
TARGETS =
12317
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
# The demo structure and contents should really be cleaned up.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    48
# Now every other demo has its own quirks where to put the
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    49
# READMEs and other files.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    50
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    51
DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share
29925
6d47adfc6b47 8077847: Better handling of Windows executable manifest version
ihse
parents: 29392
diff changeset
    52
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    53
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    54
DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    55
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    56
# This rule will be depended on due to the MANIFEST line in SetupBuildDemo
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    57
# and SetupBuildJvmtiDemo.
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    58
$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    59
  SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    60
  OUTPUT_FILE := $(DEMO_MANIFEST), \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    61
  REPLACEMENTS := \
33984
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30654
diff changeset
    62
      @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30654
diff changeset
    63
      @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    64
      @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    65
))
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    66
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    67
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    68
# Build applet demos.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    69
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    70
# Setup make rules for building a demo applet.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    71
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    72
# Parameter 1 is the name of the rule. This name is used as variable prefix,
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    73
# and the targets generated are listed in a variable by that name. It is also
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    74
# used to locate the name of the applet subdir, and to determine the name
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    75
# of the output directory.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    76
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    77
# Remaining parameters are named arguments. These include:
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    78
# SRC_DIR   Alternative source directory to use for the demos.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    79
# DISABLE_SJAVAC   Passed to SetupJavaCompilation
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    80
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    81
SetupBuildAppletDemo = $(NamedParamsMacroTemplate)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    82
define SetupBuildAppletDemoBody
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    83
  ifeq ($$($1_SRC_DIR), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    84
    $1_SRC_DIR := $(DEMO_SHARE_SRC)/applets
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    85
  endif
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    86
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    87
  $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_APPLET_$1, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    88
      SETUP := GENERATE_USINGJDKBYTECODE, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    89
      SRC := $$($1_SRC_DIR)/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    90
      BIN := $(SUPPORT_OUTPUTDIR)/demos/image/applets/$1, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    91
      COPY := .html .java .xyz .obj .au .gif, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    92
      DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    93
  ))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    94
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    95
  $1 := $$(BUILD_DEMO_APPLET_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    96
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
    97
  TARGETS += $$($1)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    98
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    99
21742
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   100
ifneq ($(OPENJDK_TARGET_OS), solaris)
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   101
  $(eval $(call SetupBuildAppletDemo, ArcTest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   102
  $(eval $(call SetupBuildAppletDemo, BarChart))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   103
  $(eval $(call SetupBuildAppletDemo, Blink))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   104
  $(eval $(call SetupBuildAppletDemo, CardTest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   105
  $(eval $(call SetupBuildAppletDemo, Clock))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   106
  $(eval $(call SetupBuildAppletDemo, DitherTest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   107
  $(eval $(call SetupBuildAppletDemo, DrawTest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   108
  $(eval $(call SetupBuildAppletDemo, Fractal))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   109
  $(eval $(call SetupBuildAppletDemo, GraphicsTest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   110
  $(eval $(call SetupBuildAppletDemo, NervousText))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   111
  $(eval $(call SetupBuildAppletDemo, SimpleGraph))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   112
  $(eval $(call SetupBuildAppletDemo, SortDemo))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   113
  $(eval $(call SetupBuildAppletDemo, SpreadSheet))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   115
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   116
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   117
# Build normal demos.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   118
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   119
COPY_TO_JAR := .html .txt .properties .js .gif .jpg .theme .data .opt .c .h \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   120
    .png .ttf .xyz .obj README COPYRIGHT
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   121
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   122
COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   123
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   124
# Setup make rules for building a demo.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   125
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   126
# Parameter 1 is the name of the rule. This name is used as variable prefix,
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   127
# and the targets generated are listed in a variable by that name.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   128
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   129
# Remaining parameters are named arguments. These include:
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   130
# DEMO_SUBDIR   The name of the subdir of the demo, below the demo top dir.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   131
# EXTRA_SRC_DIR   Additional source directory.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   132
# SRC_SUB_DIR   Optional subdir to locate source code in
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   133
# SRC_DIR   Alternative source directory to use for the demos.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   134
# EXCLUDE_FILES   Exclude file list
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   135
# JAR_NAME   Base name of jar file. Defaults to $1.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   136
# MAIN_CLASS   The main class for the jar. Defaults to $1.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   137
# EXTRA_COPY_TO_JAR   Additional files to copy to jar (as patterns)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   138
# EXTRA_COPY_TO_IMAGE   Additional files to copy to images (as wildcards)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   139
# EXTRA_MANIFEST_ATTR   Extra manifest attribute
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   140
# SKIP_COMPILATION   Skip Java compilation iff true
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   141
# DISABLE_SJAVAC   Passed to SetupJavaCompilation
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   142
SetupBuildDemo = $(NamedParamsMacroTemplate)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   143
define SetupBuildDemoBody
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   144
  ifeq ($$($1_SRC_DIR), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   145
    $1_SRC_DIR := $(DEMO_SHARE_SRC)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   146
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   147
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   148
  $1_SRC_BASE := $$($1_SRC_DIR)/$$($1_DEMO_SUBDIR)/$1
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   149
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   150
  # In some demos the source is found in a subdir
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   151
  ifneq ($$($1_SRC_SUB_DIR), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   152
    $1_MAIN_SRC := $$($1_SRC_BASE)/$$($1_SRC_SUB_DIR)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   153
  else
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   154
    # for allmost all
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   155
    $1_MAIN_SRC := $$($1_SRC_BASE)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   156
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   157
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   158
  # Default is to use demo name as jar file name.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   159
  ifeq ($$($1_JAR_NAME), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   160
    $1_JAR_NAME := $1
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   161
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   162
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   163
  # Default is to use demo name as jar main class.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   164
  ifeq ($$($1_MAIN_CLASS), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   165
    $1_MAIN_CLASS := $1
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   166
  else ifeq ($$($1_MAIN_CLASS), NONE)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   167
    $1_MAIN_CLASS :=
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   168
    $1_EXTRA_MANIFEST_ATTR += Main-Class: \n
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   169
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   170
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   171
  ifneq ($$($1_SKIP_COMPILATION), true)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   172
    $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   173
        SETUP := GENERATE_USINGJDKBYTECODE, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   174
        SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   175
        BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/$$($1_DEMO_SUBDIR)/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   176
        COPY := $(COPY_TO_JAR) $$($1_EXTRA_COPY_TO_JAR), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   177
        JAR := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/$$($1_JAR_NAME).jar, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   178
        JARMAIN := $$($1_MAIN_CLASS), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   179
        MANIFEST := $(DEMO_MANIFEST), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   180
        EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   181
        SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   182
        EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   183
        DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   184
    ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   185
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   186
    $1 += $$(BUILD_DEMO_$1)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   187
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   188
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   189
  # Copy files. Sort is needed to remove duplicates.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   190
  $1_COPY_FILES := $$(sort $$(wildcard $$(addprefix $$($1_SRC_BASE)/, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   191
      $(COPY_TO_IMAGE) $$($1_EXTRA_COPY_TO_IMAGE))))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   192
  $$(eval $$(call SetupCopyFiles, COPY_DEMO_$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   193
      SRC :=  $$($1_SRC_BASE), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   194
      DEST := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   195
      FILES := $$($1_COPY_FILES), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   196
  ))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   197
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   198
  $1 += $$(COPY_DEMO_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   199
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   200
  TARGETS += $$($1)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   201
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   202
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   203
CODEPOINT_SERVICE := java.awt.im.spi.InputMethodDescriptor
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   204
CODEPOINT_METAINF_SERVICE_FILE := \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   205
    $(SUPPORT_OUTPUTDIR)/demos/classes/jfc/CodePointIM/META-INF/services/$(CODEPOINT_SERVICE)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   206
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   207
$(eval $(call SetupBuildDemo, CodePointIM, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   208
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   209
    EXTRA_COPY_TO_JAR := $(CODEPOINT_SERVICE), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   210
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   211
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   212
# We also need to copy the CODEPOINT_SERVICE file to the META-INF/services
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   213
# location, and make sure the jar depends on that file to get it included.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   214
$(CODEPOINT_METAINF_SERVICE_FILE): $(DEMO_SHARE_SRC)/jfc/CodePointIM/$(CODEPOINT_SERVICE)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   215
	$(call install-file)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   216
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   217
$(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   218
21742
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   219
ifneq ($(OPENJDK_TARGET_OS), solaris)
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   220
  $(eval $(call SetupBuildDemo, MoleculeViewer, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   221
      DEMO_SUBDIR := applets, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   222
      MAIN_CLASS := XYZChemModel, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   223
      EXTRA_COPY_TO_IMAGE := *.java, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   224
  ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   225
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   226
  $(eval $(call SetupBuildDemo, WireFrame, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   227
      DEMO_SUBDIR := applets, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   228
      MAIN_CLASS := ThreeD, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   229
      EXTRA_COPY_TO_IMAGE := *.java, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   230
  ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   231
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   232
  $(eval $(call SetupBuildDemo, SwingApplet, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   233
      DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   234
  ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   235
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   236
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   237
$(eval $(call SetupBuildDemo, FileChooserDemo, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   238
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   239
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   240
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   241
$(eval $(call SetupBuildDemo, Font2DTest, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   242
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   243
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   244
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   245
$(eval $(call SetupBuildDemo, Metalworks, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   246
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   247
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   248
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   249
$(eval $(call SetupBuildDemo, Notepad, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   250
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   251
))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   252
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   253
$(eval $(call SetupBuildDemo, SampleTree, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   254
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   255
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   256
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   257
$(eval $(call SetupBuildDemo, TableExample, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   258
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   259
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   260
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   261
$(eval $(call SetupBuildDemo, TransparentRuler, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   262
    DEMO_SUBDIR := jfc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   263
    MAIN_CLASS := transparentruler.Ruler, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   264
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   265
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   266
$(eval $(call SetupBuildDemo, jconsole-plugin, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   267
    DEMO_SUBDIR := scripting, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   268
    SRC_SUB_DIR := src, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   269
    MAIN_CLASS := NONE, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   270
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   271
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   272
$(eval $(call SetupBuildDemo, FullThreadDump, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   273
    DEMO_SUBDIR := management, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   274
))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   275
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   276
$(eval $(call SetupBuildDemo, JTop, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   277
    DEMO_SUBDIR := management, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   278
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   279
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   280
$(eval $(call SetupBuildDemo, MemoryMonitor, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   281
    DEMO_SUBDIR := management, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   282
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   283
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   284
$(eval $(call SetupBuildDemo, VerboseGC, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   285
    DEMO_SUBDIR := management, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   286
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   287
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   288
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   289
# Build JVMTI demos.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   290
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   291
# Setup make rules for building a JVMTI demo.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   292
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   293
# Parameter 1 is the name of the rule. This name is used as variable prefix,
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   294
# and the targets generated are listed in a variable by that name.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   295
#
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   296
# Remaining parameters are named arguments. These include:
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   297
# EXTRA_SRC_SUBDIR   Also include these subdirectories
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   298
# TOOLCHAIN   Optionally specify toolchain to use
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   299
SetupBuildJvmtiDemo = $(NamedParamsMacroTemplate)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   300
define SetupBuildJvmtiDemoBody
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   301
  $1_SRC := \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   302
      $(DEMO_SHARE_SRC)/jvmti/$1 \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   303
      $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   304
          agent_util $$($1_EXTRA_SRC_SUBDIR)))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   305
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   306
  ### Build the native lib
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   307
  $1_CFLAGS_INCLUDE := $$(addprefix -I, $$($1_SRC))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   308
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   309
  $1_CXXFLAGS := $$($1_CFLAGS_INCLUDE) $(CXXFLAGS_JDKLIB) $(CXXFLAGS_DEBUG_SYMBOLS)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   310
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   311
  ifeq ($$($1_TOOLCHAIN), TOOLCHAIN_LINK_CXX)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   312
    # For C++, we also need some special treatment.
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34539
diff changeset
   313
    $1_LDFLAGS := $$(LDFLAGS_CXX_JDK)
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   314
    $1_LIBS := $(LIBCXX)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   315
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   316
    ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   317
      $1_CXXFLAGS := $$(filter-out -xregs=no%appl, $$($1_CXXFLAGS))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   318
    endif
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   319
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   320
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   321
  # Remove the -incremental:no setting to get .ilk-files like in the old build.
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   322
  $$(eval $$(call SetupNativeCompilation, BUILD_DEMO_JVMTI_NATIVE_$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   323
      SRC := $$($1_SRC), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   324
      TOOLCHAIN := $$($1_TOOLCHAIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   325
      OPTIMIZATION := LOW, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   326
      CFLAGS := $$($1_CFLAGS_INCLUDE) $$(CFLAGS_JDKLIB) $$(CFLAGS_DEBUG_SYMBOLS), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   327
      CXXFLAGS := $$($1_CXXFLAGS), \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34539
diff changeset
   328
      LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)) \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   329
          $$($1_LDFLAGS), \
34695
7a6cc9982d22 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 34539
diff changeset
   330
      LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   331
      LIBS := $$($1_LIBS), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   332
      LIBS_solaris := -lc, \
29925
6d47adfc6b47 8077847: Better handling of Windows executable manifest version
ihse
parents: 29392
diff changeset
   333
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   334
      RC_FLAGS := $$(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   335
          -D "JDK_FNAME=$1.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   336
          -D "JDK_INTERNAL_NAME=$1" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   337
          -D "JDK_FTYPE=0x2L", \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   338
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   339
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   340
      LIBRARY := $1, \
41353
910288d26d83 8150736: Excessive disk space used by build system
erikj
parents: 35241
diff changeset
   341
      STRIP_SYMBOLS := false, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   342
  ))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   343
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   344
  $1 += $$(BUILD_DEMO_JVMTI_NATIVE_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   345
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   346
  ### Build the jar, if we have java sources
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   347
  ifneq ($$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java), )
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   348
    $$(eval $$(call SetupJavaCompilation, BUILD_DEMO_JVMTI_JAVA_$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   349
        SETUP := GENERATE_USINGJDKBYTECODE, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   350
        SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   351
        BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jvmti/$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   352
        COPY := $(COPY_TO_JAR), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   353
        JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/$1.jar, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   354
        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   355
        MANIFEST := $(DEMO_MANIFEST), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   356
    ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   357
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   358
    $1 += $$(BUILD_DEMO_JVMTI_JAVA_$1_JAR)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   359
  endif
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   360
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   361
  ### Build the source zip
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   362
  $1_EXCLUDE_FILES := \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   363
      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   364
          agent_util $$($1_EXTRA_SRC_SUBDIR))) \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   365
      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   366
          agent_util $$($1_EXTRA_SRC_SUBDIR)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   367
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   368
  $$(eval $$(call SetupZipArchive, BUILD_DEMO_JVMTI_SRC_$1, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   369
      SRC := $$($1_SRC), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   370
      EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   371
      ZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/src.zip, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   372
  ))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   373
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   374
  $1 += $$(BUILD_DEMO_JVMTI_SRC_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   375
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   376
  # Copy files to image
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   377
  $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   378
	$$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   379
	$(CHMOD) -f ug+w $$@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   380
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   381
  $1 += $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/README.txt
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   382
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   383
  ifeq ($(OPENJDK_TARGET_OS), windows)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   384
    # These lib and exp files normally end up in OBJECT_DIR but for demos they
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   385
    # are supposed to be included in the distro. Since they are created as
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   386
    # a side-effect of the library compilation, make does not know about them.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   387
    $1_SUPPORT_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/native/jvmti/$1
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   388
    $1_IMAGE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/$1/lib
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   389
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   390
    $$($1_SUPPORT_OUTPUTDIR)/$1.lib: $$(BUILD_DEMO_JVMTI_NATIVE_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   391
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   392
    $$($1_SUPPORT_OUTPUTDIR)/$1.exp: $$(BUILD_DEMO_JVMTI_NATIVE_$1)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   393
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   394
    $$($1_IMAGE_OUTPUTDIR)/$1.lib: $$($1_SUPPORT_OUTPUTDIR)/$1.lib
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   395
	$$(call install-file)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   396
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   397
    $$($1_IMAGE_OUTPUTDIR)/$1.exp: $$($1_SUPPORT_OUTPUTDIR)/$1.exp
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   398
	$$(call install-file)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   399
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   400
    $1 += $$($1_IMAGE_OUTPUTDIR)/$1.lib $$($1_IMAGE_OUTPUTDIR)/$1.exp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   401
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   402
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   403
  TARGETS += $$($1)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   404
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   405
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   406
$(eval $(call SetupBuildJvmtiDemo, compiledMethodLoad))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   407
$(eval $(call SetupBuildJvmtiDemo, gctest))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   408
$(eval $(call SetupBuildJvmtiDemo, heapViewer))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   409
$(eval $(call SetupBuildJvmtiDemo, versionCheck))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   410
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   411
$(eval $(call SetupBuildJvmtiDemo, heapTracker, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   412
    EXTRA_SRC_SUBDIR := java_crw_demo, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   413
))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   414
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   415
$(eval $(call SetupBuildJvmtiDemo, minst, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   416
    EXTRA_SRC_SUBDIR := java_crw_demo, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   417
))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   418
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   419
$(eval $(call SetupBuildJvmtiDemo, mtrace, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   420
    EXTRA_SRC_SUBDIR := java_crw_demo, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   421
))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   422
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   423
$(eval $(call SetupBuildJvmtiDemo, waiters, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   424
    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   425
))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   426
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   427
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   428
# Build the Poller demo (on Solaris only).
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   429
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   430
ifeq ($(OPENJDK_TARGET_OS), solaris)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   431
  DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   432
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   433
  $(eval $(call SetupJavaCompilation, BUILD_DEMO_JAVA_Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   434
      SETUP := GENERATE_USINGJDKBYTECODE, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   435
      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   436
      BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   437
      HEADERS := $(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   438
      JAR := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/Poller.jar, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   439
      MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   440
      SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/src.zip, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   441
      COPY := README.txt Poller.c, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   442
      JARMAIN := Client, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   443
  ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   444
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   445
  TARGETS += $(BUILD_DEMO_JAVA_Poller)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   446
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   447
  $(eval $(call SetupNativeCompilation, BUILD_DEMO_NATIVE_Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   448
      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   449
      OPTIMIZATION := LOW, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   450
      CFLAGS := $(CFLAGS_JDKLIB) \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   451
          -I$(SUPPORT_OUTPUTDIR)/demos/classes/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   452
      LDFLAGS := $(LDFLAGS_JDKLIB), \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   453
      LIBS_solaris := -lc, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   454
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   455
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demos/native, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   456
      LIBRARY := Poller, \
41353
910288d26d83 8150736: Excessive disk space used by build system
erikj
parents: 35241
diff changeset
   457
      STRIP_SYMBOLS := false, \
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   458
  ))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   459
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   460
  TARGETS += $(BUILD_DEMO_NATIVE_Poller)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   461
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   462
  # We can only compile native code after java has been compiled (since we
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   463
  # depend on generated .h files)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   464
  $(SUPPORT_OUTPUTDIR)/demos/native/jni/Poller/Poller.o: \
34539
4f2243ba7257 8145106: Still intermittent build error building jdk/src/demo/solaris/jni/Poller/Poller.c
erikj
parents: 34524
diff changeset
   465
      $(BUILD_DEMO_JAVA_Poller)
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   466
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   467
  # Copy to image
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   468
  $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt: \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   469
      $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   470
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   471
	$(CHMOD) -f ug+w $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   472
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   473
  TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/README.txt
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   474
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   475
  $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so: \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   476
      $(SUPPORT_OUTPUTDIR)/demos/native/libPoller.so
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   477
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   478
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   479
  TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/jni/Poller/lib/libPoller.so
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   480
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   481
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   482
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   483
# Copy html and README files.
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   484
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   485
$(SUPPORT_OUTPUTDIR)/demos/image/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   486
	$(call install-file)
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   487
	$(CHMOD) -f ug+w $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   488
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   489
$(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   490
	$(call install-file)
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   491
	$(CHMOD) -f ug+w $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   492
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   493
$(SUPPORT_OUTPUTDIR)/demos/image/README: $(DEMO_SHARE_SRC)/README
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   494
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   495
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   496
TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/management/index.html \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   497
    $(SUPPORT_OUTPUTDIR)/demos/image/jvmti/index.html \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   498
    $(SUPPORT_OUTPUTDIR)/demos/image/README
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   499
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   500
################################################################################
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   501
# Copy netbeans project files.
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   502
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   503
$(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   504
	$(call install-file)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   505
	$(CHMOD) -f ug+w $@
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   506
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   507
ifeq ($(OPENJDK_TARGET_OS), solaris)
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   508
  TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   509
    $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   510
    $(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   511
    $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   512
else
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   513
  TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   514
    $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   515
    $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   516
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   517
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   518
################################################################################
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   519
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   520
# Hook to include the corresponding custom file, if present.
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   521
$(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk))
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   522
33502
61feec1d58aa 8141261: Clean up building of demos
ihse
parents: 33406
diff changeset
   523
all: $(TARGETS)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   524
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   525
.PHONY: all