< prev index next >

make/ZipSource.gmk

Print this page


   1 #
   2 # Copyright (c) 2014, 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


  70 ifeq ($(SRC_GENERATED), true)
  71 
  72   # Rewrite the EXCLUDE_TRANSLATIONS locales as exclude patters for java files
  73   TRANSLATIONS_PATTERN := $(addprefix %_, $(addsuffix .java, $(EXCLUDE_TRANSLATIONS)))
  74 
  75   # Add excludes for translations for all modules except jdk.localedata
  76   $(foreach s, $(SRC_ZIP_SRCS), \
  77     $(if $(filter $(notdir $s), jdk.localedata), , \
  78       $(eval BUILD_SRC_ZIP_EXCLUDE_PATTERNS_$(dir $s) := $$(TRANSLATIONS_PATTERN)) \
  79     ) \
  80   )
  81 
  82   $(eval $(call SetupZipArchive, BUILD_SRC_ZIP, \
  83       SRC := $(dir $(SRC_ZIP_SRCS)), \
  84       INCLUDES := $(SRC_ZIP_INCLUDES), \
  85       INCLUDE_FILES := $(SRC_ZIP_INCLUDE_FILES), \
  86       EXCLUDES := $(SRC_ZIP_EXCLUDES), \
  87       EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
  88       SUFFIXES := .java, \
  89       ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \
  90       FOLLOW_SYMLINKS := true, \
  91   ))
  92 
  93   do-zip: $(BUILD_SRC_ZIP)
  94 
  95   .PHONY: do-zip
  96 endif
  97 
  98 zip: $(SRC_ZIP_SRCS)
  99         +$(MAKE) $(MAKE_ARGS) -f ZipSource.gmk do-zip SRC_GENERATED=true
 100 
 101 TARGETS += zip
 102 
 103 ################################################################################
 104 
 105 all: $(TARGETS)
 106 
 107 .PHONY: default all zip
   1 #
   2 # Copyright (c) 2014, 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


  70 ifeq ($(SRC_GENERATED), true)
  71 
  72   # Rewrite the EXCLUDE_TRANSLATIONS locales as exclude patters for java files
  73   TRANSLATIONS_PATTERN := $(addprefix %_, $(addsuffix .java, $(EXCLUDE_TRANSLATIONS)))
  74 
  75   # Add excludes for translations for all modules except jdk.localedata
  76   $(foreach s, $(SRC_ZIP_SRCS), \
  77     $(if $(filter $(notdir $s), jdk.localedata), , \
  78       $(eval BUILD_SRC_ZIP_EXCLUDE_PATTERNS_$(dir $s) := $$(TRANSLATIONS_PATTERN)) \
  79     ) \
  80   )
  81 
  82   $(eval $(call SetupZipArchive, BUILD_SRC_ZIP, \
  83       SRC := $(dir $(SRC_ZIP_SRCS)), \
  84       INCLUDES := $(SRC_ZIP_INCLUDES), \
  85       INCLUDE_FILES := $(SRC_ZIP_INCLUDE_FILES), \
  86       EXCLUDES := $(SRC_ZIP_EXCLUDES), \
  87       EXCLUDE_FILES := $(SRC_ZIP_EXCLUDE_FILES), \
  88       SUFFIXES := .java, \
  89       ZIP := $(SUPPORT_OUTPUTDIR)/src.zip, \

  90   ))
  91 
  92   do-zip: $(BUILD_SRC_ZIP)
  93 
  94   .PHONY: do-zip
  95 endif
  96 
  97 zip: $(SRC_ZIP_SRCS)
  98         +$(MAKE) $(MAKE_ARGS) -f ZipSource.gmk do-zip SRC_GENERATED=true
  99 
 100 TARGETS += zip
 101 
 102 ################################################################################
 103 
 104 all: $(TARGETS)
 105 
 106 .PHONY: default all zip
< prev index next >