jdk/make/CompileDemos.gmk
author ihse
Thu, 11 Jun 2015 00:23:01 +0200
changeset 33984 2333676816eb
parent 30654 3c2e826aa5ea
child 34012 b8b34f35e2ee
permissions -rw-r--r--
8085822: JEP 223: New Version-String Scheme (initial integration) Reviewed-by: erikj, dcubed, dholmes, alanb Contributed-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>, Alejandro E Murillo <alejandro.murillo@oracle.com>, Kumar Srinivasan <kumar.x.srinivasan@oracle.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
     2
# Copyright (c) 2011, 2015, 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
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    26
default: all
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
include $(SPEC)
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
include MakeBase.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    30
include JavaCompilation.gmk
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
include NativeCompilation.gmk
26191
a0ff4b39d34b 8055188: General cleanup of minor issues from source restructure
erikj
parents: 25859
diff changeset
    32
include SetupJavaCompilers.gmk
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    33
include TextFileProcessing.gmk
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    34
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    35
# Prepare the find cache.
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    36
$(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
    37
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    38
# Append demo goals to this variable.
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    39
BUILD_DEMOS =
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    40
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    41
# The demo structure and contents should really be cleaned up.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    42
# Now every other demo has its own quirks where to put the
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    43
# READMEs and other files.
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    44
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    45
DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    46
DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    47
DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27194
diff changeset
    48
DEMO_OS_TYPE_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_TYPE)
29925
6d47adfc6b47 8077847: Better handling of Windows executable manifest version
ihse
parents: 29392
diff changeset
    49
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
    50
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    51
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    52
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    53
# This rule will be depended on due to the MANIFEST line
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    54
$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    55
  SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    56
  OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    57
  REPLACEMENTS := \
33984
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30654
diff changeset
    58
      @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
2333676816eb 8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents: 30654
diff changeset
    59
      @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    60
      @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    61
))
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
    62
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    63
define SetupAppletDemo
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    64
  $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    65
      SETUP := GENERATE_USINGJDKBYTECODE, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
    66
      SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
    67
      BIN := $(SUPPORT_OUTPUTDIR)/demo/image/applets/$1, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    68
      COPY := .html .java .xyz .obj .au .gif, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    69
      DISABLE_SJAVAC := $2))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    70
      BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    71
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    72
21742
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    73
ifneq ($(OPENJDK_TARGET_OS), solaris)
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    74
  $(eval $(call SetupAppletDemo,ArcTest))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    75
  $(eval $(call SetupAppletDemo,BarChart))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    76
  $(eval $(call SetupAppletDemo,Blink))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    77
  $(eval $(call SetupAppletDemo,CardTest))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    78
  $(eval $(call SetupAppletDemo,Clock))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    79
  $(eval $(call SetupAppletDemo,DitherTest))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    80
  $(eval $(call SetupAppletDemo,DrawTest))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    81
  $(eval $(call SetupAppletDemo,Fractal))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    82
  $(eval $(call SetupAppletDemo,GraphicsTest))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    83
  $(eval $(call SetupAppletDemo,NervousText))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    84
  $(eval $(call SetupAppletDemo,SimpleGraph))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    85
  $(eval $(call SetupAppletDemo,SortDemo))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    86
  $(eval $(call SetupAppletDemo,SpreadSheet))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    87
21742
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    88
  ifndef OPENJDK
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    89
    $(eval $(call SetupAppletDemo,Animator,,closed/))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    90
    $(eval $(call SetupAppletDemo,GraphLayout,true,closed/))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    91
    $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    92
    $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
    93
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    94
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    95
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    96
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    97
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
    98
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
    99
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   100
define SetupDemo
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   101
  # Param 1 = Name of the demo
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   102
  # Param 2 = Subdirectory of the demo below the demo directory.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   103
  # Param 3 = Additional javac flags.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   104
  # Param 4 = The main class for the jar.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   105
  # Param 5 = Additional source directory.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   106
  # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   107
  # Param 7 = List of files to copy
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   108
  # Param 8 = Base name of jar file. Defaults to $1
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   109
  # Param 9 = Exclude list
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   110
  # Param 10 = Extra copy patterns
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   111
  # Param 11 = Extra manifest attribute
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   112
  # Param 12 = Suffix for compiler setup name
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   113
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   114
  $1_SRC_BASE := $(JDK_TOPDIR)/src/$6demo/share/$2/$1
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   115
  # In some demos the source is found in a subdir called src.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   116
  $1_MAIN_SRC := $$(wildcard $$($1_SRC_BASE)/src)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   117
  ifeq ($$($1_MAIN_SRC), )
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   118
    $1_MAIN_SRC := $$($1_SRC_BASE)
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   119
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   120
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   121
  ifneq ($8, )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   122
    $1_JARFILE := $8.jar
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   123
  else
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   124
    $1_JARFILE := $1.jar
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   125
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   126
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   127
  ifeq ($(findstring $1,Laffy SwingSet3), )
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   128
    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   129
        SETUP := GENERATE_USINGJDKBYTECODE, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   130
        ADD_JAVAC_FLAGS := $3, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   131
        SRC := $$($1_MAIN_SRC) $5, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   132
        BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/$2/$1, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   133
        COPY := $(PATTERNS_TO_COPY) $(10), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   134
        JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   135
        JARMAIN := $4, \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
   136
        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   137
        EXTRA_MANIFEST_ATTR := $(11), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   138
        SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   139
        EXCLUDE_FILES := $9, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   140
        DISABLE_SJAVAC := $(12)))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   141
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   142
    BUILD_DEMOS += $$(BUILD_DEMO_$1) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   143
        $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE) \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   144
        $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   145
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   146
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   147
  # Copy files.
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   148
  $1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   149
      $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   150
      $$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7)))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   151
  ifneq ($7, )
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   152
    $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/%: $$($1_SRC_BASE)/%
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   153
	$$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   154
	$(CHMOD) -f ug+w $$@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   155
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   156
    BUILD_DEMOS += $$($1_COPY_TARGETS)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   157
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   158
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   159
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   160
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   161
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   162
$(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services: \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   163
    $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   164
    $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   165
	(cd $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM && \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   166
	$(MKDIR) -p _the.tmp/META-INF/services && \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   167
	$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
27194
48c1741d0f2a 8061924: demos target fails if users CDPATH is incorrectly set
erikj
parents: 26202
diff changeset
   168
	cd ./_the.tmp && \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   169
	$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
27194
48c1741d0f2a 8061924: demos target fails if users CDPATH is incorrectly set
erikj
parents: 26202
diff changeset
   170
	cd ./META-INF/services && \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   171
	$(JAR) uf $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   172
	$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.tmp
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   173
	$(TOUCH) $@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   174
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   175
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jfc/CodePointIM/_the.services
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   176
21742
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   177
ifneq ($(OPENJDK_TARGET_OS), solaris)
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   178
  $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   179
  $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   180
  $(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
e61b55843e88 8028645: [infra] purge applet demos from the Solaris distros
ksrini
parents: 21535
diff changeset
   181
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   182
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   183
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   184
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   185
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   186
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   187
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   188
$(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
   189
$(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   190
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*))
14521
6196ce8b0c33 8001906: build-infra: warning: [path] bad path element on Solaris
tbell
parents: 14231
diff changeset
   191
$(eval $(call SetupDemo,JTop,management,,JTop,,,README*))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   192
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   193
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*))
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   194
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   195
ifndef OPENJDK
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   196
  $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   197
  $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   198
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   199
  $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   200
  $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   201
  $(DEMO_SHARE_SRC)/jfc/Notepad,closed/,*.txt,,$(DEMO_SHARE_SRC)/jfc/Notepad/README.txt))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   202
  $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   203
      SplashScreen-Image: resources/images/splash.png,true))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   204
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   205
  BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   206
      $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   207
      $(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   208
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   209
  $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   210
	$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   211
	$(CHMOD) -f ug+w $@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   212
endif
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   213
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   214
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   215
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   216
# In the old makefiles, j2dbench was not compiled.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   217
#$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   218
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   219
# 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
   220
# 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
   221
# 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
   222
# from the extra sources.
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   223
define SetupJVMTIDemo
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   224
  # Param 1 = Name of the demo
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   225
  # 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
   226
  # Param 3 = extra CFLAGS
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   227
  # Param 4 = C or C++ (defaults to C)
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27194
diff changeset
   228
  # Param 5 = libs for unix
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   229
  # Param 6 = libs for windows
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   230
  # Param 7 = libs for solaris
22597
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 21535
diff changeset
   231
  # Param 8 = libs for linux
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 21535
diff changeset
   232
  # Param 9 = extra directories with required sources
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   233
  # Param 10 = DISABLED_WARNINGS_gcc
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   234
  # Param 11 = DISABLED_WARNINGS_microsoft
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   235
  # Param 12 = DISABLED_WARNINGS_clang
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   236
  BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27194
diff changeset
   237
      $$(wildcard $(DEMO_OS_TYPE_SRC)/jvmti/$1) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   238
      $$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, $2)) \
22597
7515a991bb37 8024854: PPC64: Basic changes and files to build the class library on AIX
simonis
parents: 21535
diff changeset
   239
      $9
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   240
  BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   241
      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   242
      $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   243
  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
   244
  ifeq (C++, $4)
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29925
diff changeset
   245
    BUILD_DEMO_JVMTI_$1_TOOLCHAIN := TOOLCHAIN_LINK_CXX
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   246
    $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   247
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   248
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   249
  $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(DEMO_SHARE_SRC)/jvmti/$1 \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   250
      $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   251
      $(CXXFLAGS_DEBUG_SYMBOLS)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   252
  ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   253
    $1_FILTER := -xregs=no%appl
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   254
    $1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   255
  endif
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   256
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   257
  # 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
   258
  # eval call below, the comma gets expanded too early.
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   259
  BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   260
      -I$(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   261
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   262
  # 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
   263
  $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   264
      SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
29931
64e274ed6567 8077824: Introduce DefineNativeToolchain to handle toolchain configurations
erikj
parents: 29925
diff changeset
   265
      TOOLCHAIN := $$(BUILD_DEMO_JVMTI_$1_TOOLCHAIN), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   266
      OPTIMIZATION := LOW, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   267
      CXXFLAGS := $$($1_CXXFLAGS), \
29374
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   268
      DISABLED_WARNINGS_gcc := $(10), \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   269
      DISABLED_WARNINGS_clang := $(12), \
f031a666744a 8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents: 27799
diff changeset
   270
      DISABLED_WARNINGS_microsoft := $(11), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   271
      LDFLAGS := $(filter-out -incremental:no -opt:ref, $(LDFLAGS_JDKLIB)), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   272
      LDFLAGS_macosx := $(call SET_EXECUTABLE_ORIGIN), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   273
      LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
27736
8c9bd4be4a86 8058631: Rename posix to unix in build system to match file name changes
ihse
parents: 27194
diff changeset
   274
      LDFLAGS_SUFFIX_unix := $5, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   275
      LDFLAGS_SUFFIX_windows := $6, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   276
      LDFLAGS_SUFFIX_solaris := $7 -lc, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   277
      LDFLAGS_SUFFIX_linux := $8, \
29925
6d47adfc6b47 8077847: Better handling of Windows executable manifest version
ihse
parents: 29392
diff changeset
   278
      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   279
      RC_FLAGS := $$(RC_FLAGS) \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   280
          -D "JDK_FNAME=$1.dll" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   281
          -D "JDK_INTERNAL_NAME=$1" \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   282
          -D "JDK_FTYPE=0x2L", \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   283
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   284
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   285
      LIBRARY := $1))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   286
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   287
  $$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   288
      SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   289
      EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   290
      ZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   291
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   292
  $(SUPPORT_OUTPUTDIR)/demo/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
   293
	$$(call install-file)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   294
	$(CHMOD) -f ug+w $$@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   295
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   296
  ifneq (, $$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   297
    $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   298
        SETUP := GENERATE_USINGJDKBYTECODE, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   299
        SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   300
        BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jvmti/$1, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   301
        COPY := $(PATTERNS_TO_COPY), \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   302
        JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   303
        EXTRA_MANIFEST_ATTR := Main-Class: \n, \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
   304
        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   305
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   306
    BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   307
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   308
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   309
  BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   310
      $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/src.zip \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   311
      $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/README.txt
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   312
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   313
  ifeq ($(OPENJDK_TARGET_OS), windows)
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   314
    # 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
   315
    # are supposed to be included in the distro.
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   316
    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib: $$(BUILD_DEMO_JVMTI_$1)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   317
	$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.lib $$@
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   318
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   319
    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp: $$(BUILD_DEMO_JVMTI_$1)
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   320
	$(CP) $(SUPPORT_OUTPUTDIR)/demo/native/jvmti/$1/$1.exp $$@
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   321
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   322
    BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.lib \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   323
        $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/lib/$1.exp
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   324
  endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   325
endef
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   326
29392
89636c9b09d0 8074841: Resolve disabled warnings for the JVMTI demo compiledMethodLoad
sla
parents: 29374
diff changeset
   327
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   328
$(eval $(call SetupJVMTIDemo,gctest, agent_util))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   329
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   330
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   331
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   332
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
29392
89636c9b09d0 8074841: Resolve disabled warnings for the JVMTI demo compiledMethodLoad
sla
parents: 29374
diff changeset
   333
$(eval $(call SetupJVMTIDemo,waiters, agent_util, , C++))
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   334
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   335
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   336
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   337
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   338
$(SUPPORT_OUTPUTDIR)/demo/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
   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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   342
$(SUPPORT_OUTPUTDIR)/demo/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
   343
	$(call install-file)
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   344
	$(CHMOD) -f ug+w $@
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   345
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   346
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/management/index.html \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   347
    $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/index.html
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   348
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   349
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   350
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   351
# The netbeans project files are copied into the demo directory.
22067
3623b46a325d 8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents: 21854
diff changeset
   352
ifeq ($(OPENJDK_TARGET_OS), solaris)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   353
  BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   354
    $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   355
    $(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   356
    $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
22067
3623b46a325d 8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents: 21854
diff changeset
   357
else
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   358
  BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   359
    $(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   360
    $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
22067
3623b46a325d 8029513: SwingApplet demo files still found in JDK 8 on Solaris
ksrini
parents: 21854
diff changeset
   361
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   362
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   363
$(SUPPORT_OUTPUTDIR)/demo/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   364
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   365
	$(CHMOD) -f ug+w $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   366
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   367
##################################################################################################
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   368
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   369
$(SUPPORT_OUTPUTDIR)/demo/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
   370
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   371
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   372
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/README
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   373
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   374
##################################################################################################
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   375
13164
72c5d01a857d 7181504: Update of latest build-infra Makefiles
erikj
parents: 12892
diff changeset
   376
ifeq ($(OPENJDK_TARGET_OS), solaris)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   377
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   378
  $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   379
	$(call install-file)
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   380
	$(CHMOD) -f ug+w $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   381
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   382
  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/README.txt: $(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
   383
	$(call install-file)
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   384
	$(CHMOD) -f ug+w $@
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   385
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   386
  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar: \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   387
      $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/README.txt \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   388
      $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller/Poller.c
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   389
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   390
  $(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   391
      SETUP := GENERATE_USINGJDKBYTECODE, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   392
      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   393
      BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   394
      HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   395
      JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
30654
3c2e826aa5ea 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
ihse
parents: 30434
diff changeset
   396
      MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   397
      SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   398
      COPY := README.txt Poller.c, \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   399
      JARMAIN := Client))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   400
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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   403
  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   404
      $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   405
      $(SUPPORT_OUTPUTDIR)/demo/image/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, \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   408
      SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   409
      OPTIMIZATION := LOW, \
30434
6b881118c93b 8074859: Turn on warnings as error
ihse
parents: 29931
diff changeset
   410
      CFLAGS := $(CFLAGS_JDKLIB) \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   411
          -I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   412
      LDFLAGS := $(LDFLAGS_JDKLIB), \
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   413
      LDFLAGS_SUFFIX_solaris := -lc, \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   414
      OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller, \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   415
      OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/demo/native, \
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   416
      LIBRARY := Poller))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   417
20547
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   418
  #
453837141fac 8001931: The new build system whitespace cleanup
ihse
parents: 20116
diff changeset
   419
  # 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
   420
  #
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   421
  $(SUPPORT_OUTPUTDIR)/demo/native/jni/Poller/Poller.o: $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   422
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   423
  $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX): \
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   424
      $(SUPPORT_OUTPUTDIR)/demo/native/$(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
   425
	$(call install-file)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   426
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   427
  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/lib/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   428
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   429
endif
12317
9670c1610c53 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   430
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
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   433
ifndef OPENJDK
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   434
  DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   435
  DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   436
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   437
  $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents: 12317
diff changeset
   438
	$(MKDIR) -p $(@D)
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   439
	$(RM) -r $(SUPPORT_OUTPUTDIR)/demo/image/db $(SUPPORT_OUTPUTDIR)/demo/image/demo
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   440
	$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(UNZIP) -q -o $<
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   441
	$(MV) $(SUPPORT_OUTPUTDIR)/demo/image/db-derby-*-bin/demo $(SUPPORT_OUTPUTDIR)/demo/image/db
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   442
	$(CD) $(SUPPORT_OUTPUTDIR)/demo/image && $(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.
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   446
  $(SUPPORT_OUTPUTDIR)/demo/image/db/README-JDK-DEMOS.html: \
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   447
      $(DB_ZIP_DIR)/README-JDK-DEMOS.html \
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   448
      | $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped
17428
5c68e5cbfde0 8013403: Update JDK8 with Java DB 10.10.1.1.
dwanvik
parents: 16636
diff changeset
   449
	$(MKDIR) -p $(@D)
25859
3317bb8137f4 8054834: Modular Source Code
chegar
parents: 24967
diff changeset
   450
	$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
16636
1cc691bcfe50 8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents: 15676
diff changeset
   451
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27194
diff changeset
   452
  BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/_the.db.unzipped $(SUPPORT_OUTPUTDIR)/demo/image/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