< prev index next >

make/CompileDemos.gmk

Print this page


   1 #
   2 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  26 ################################################################################
  27 # Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
  28 ################################################################################
  29 
  30 default: all
  31 
  32 include $(SPEC)
  33 include MakeBase.gmk
  34 include JavaCompilation.gmk
  35 include NativeCompilation.gmk
  36 include SetupJavaCompilers.gmk
  37 include TextFileProcessing.gmk
  38 include ZipArchive.gmk
  39 
  40 # Hook to include the corresponding custom file, if present.
  41 $(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
  42 
  43 # Prepare the find cache.
  44 DEMO_SRC_DIRS += $(TOPDIR)/src/demo
  45 
  46 $(call FillFindCache, $(DEMO_SRC_DIRS))
  47 
  48 # Append demo goals to this variable.
  49 TARGETS =
  50 
  51 # The demo structure and contents should really be cleaned up.
  52 # Now every other demo has its own quirks where to put the
  53 # READMEs and other files.
  54 
  55 DEMO_SHARE_SRC := $(TOPDIR)/src/demo/share
  56 GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
  57 
  58 DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf
  59 
  60 # This rule will be depended on due to the MANIFEST line in SetupBuildDemo
  61 # and SetupBuildJvmtiDemo.
  62 $(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
  63   SOURCE_FILES := $(TOPDIR)/make/data/mainmanifest/manifest.mf, \
  64   OUTPUT_FILE := $(DEMO_MANIFEST), \
  65   REPLACEMENTS := \
  66       @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \


 217 $(eval $(call SetupBuildDemo, TransparentRuler, \
 218     DEMO_SUBDIR := jfc, \
 219     MAIN_CLASS := transparentruler.Ruler, \
 220 ))
 221 
 222 ################################################################################
 223 # Copy html and README files.
 224 
 225 $(SUPPORT_OUTPUTDIR)/demos/image/README: $(DEMO_SHARE_SRC)/README
 226         $(call install-file)
 227 
 228 TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/README
 229 
 230 ################################################################################
 231 # Copy netbeans project files.
 232 
 233 $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
 234         $(call install-file)
 235         $(CHMOD) -f ug+w $@
 236 
 237 ifeq ($(call isTargetOs, solaris), true)
 238   TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
 239     $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
 240     $(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
 241 else
 242   TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
 243     $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
 244     $(call FindFiles, $(DEMO_SHARE_SRC)/nbproject))
 245 endif
 246 
 247 ################################################################################
 248 
 249 ifneq ($(filter images, $(MAKECMDGOALS)), )
 250   $(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
 251       SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
 252       DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
 253       FILES := $(call FindFiles, $(SUPPORT_OUTPUTDIR)/demos/image), \
 254   ))
 255 
 256   IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
 257 endif
 258 
 259 ################################################################################
 260 # Hook to include the corresponding custom file, if present.
 261 $(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
 262 
 263 all: $(TARGETS)
 264 images: $(IMAGES_TARGETS)
 265 
 266 .PHONY: all
   1 #
   2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  26 ################################################################################
  27 # Build demos for the JDK into $(SUPPORT_OUTPUTDIR)/demos/image.
  28 ################################################################################
  29 
  30 default: all
  31 
  32 include $(SPEC)
  33 include MakeBase.gmk
  34 include JavaCompilation.gmk
  35 include NativeCompilation.gmk
  36 include SetupJavaCompilers.gmk
  37 include TextFileProcessing.gmk
  38 include ZipArchive.gmk
  39 
  40 # Hook to include the corresponding custom file, if present.
  41 $(eval $(call IncludeCustomExtension, CompileDemos-pre.gmk))
  42 
  43 # Prepare the find cache.
  44 DEMO_SRC_DIRS += $(TOPDIR)/src/demo
  45 
  46 $(eval $(call FillCacheFind, $(wildcard $(DEMO_SRC_DIRS))))
  47 
  48 # Append demo goals to this variable.
  49 TARGETS =
  50 
  51 # The demo structure and contents should really be cleaned up.
  52 # Now every other demo has its own quirks where to put the
  53 # READMEs and other files.
  54 
  55 DEMO_SHARE_SRC := $(TOPDIR)/src/demo/share
  56 GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
  57 
  58 DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf
  59 
  60 # This rule will be depended on due to the MANIFEST line in SetupBuildDemo
  61 # and SetupBuildJvmtiDemo.
  62 $(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
  63   SOURCE_FILES := $(TOPDIR)/make/data/mainmanifest/manifest.mf, \
  64   OUTPUT_FILE := $(DEMO_MANIFEST), \
  65   REPLACEMENTS := \
  66       @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \


 217 $(eval $(call SetupBuildDemo, TransparentRuler, \
 218     DEMO_SUBDIR := jfc, \
 219     MAIN_CLASS := transparentruler.Ruler, \
 220 ))
 221 
 222 ################################################################################
 223 # Copy html and README files.
 224 
 225 $(SUPPORT_OUTPUTDIR)/demos/image/README: $(DEMO_SHARE_SRC)/README
 226         $(call install-file)
 227 
 228 TARGETS += $(SUPPORT_OUTPUTDIR)/demos/image/README
 229 
 230 ################################################################################
 231 # Copy netbeans project files.
 232 
 233 $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
 234         $(call install-file)
 235         $(CHMOD) -f ug+w $@
 236 
 237 ifeq ($(OPENJDK_TARGET_OS), solaris)
 238   TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
 239     $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
 240     $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
 241 else
 242   TARGETS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
 243     $(SUPPORT_OUTPUTDIR)/demos/image/nbproject/%, \
 244     $(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
 245 endif
 246 
 247 ################################################################################
 248 
 249 ifneq ($(filter images, $(MAKECMDGOALS)), )
 250   $(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
 251       SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
 252       DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
 253       FILES := $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image), \
 254   ))
 255 
 256   IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
 257 endif
 258 
 259 ################################################################################
 260 # Hook to include the corresponding custom file, if present.
 261 $(eval $(call IncludeCustomExtension, CompileDemos-post.gmk))
 262 
 263 all: $(TARGETS)
 264 images: $(IMAGES_TARGETS)
 265 
 266 .PHONY: all
< prev index next >