1 # Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
   2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3 #
   4 # This code is free software; you can redistribute it and/or modify it
   5 # under the terms of the GNU General Public License version 2 only, as
   6 # published by the Free Software Foundation.  Oracle designates this
   7 # particular file as subject to the "Classpath" exception as provided
   8 # by Oracle in the LICENSE file that accompanied this code.
   9 #
  10 # This code is distributed in the hope that it will be useful, but WITHOUT
  11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13 # version 2 for more details (a copy is included in the LICENSE file that
  14 # accompanied this code).
  15 #
  16 # You should have received a copy of the GNU General Public License version
  17 # 2 along with this work; if not, write to the Free Software Foundation,
  18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19 #
  20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21 # or visit www.oracle.com if you need additional information or have any
  22 # questions.
  23 
  24 BUILDDIR = ../../..
  25 MODULE  = servicetag
  26 PACKAGE = com.sun.servicetag
  27 PRODUCT = sun
  28 include $(BUILDDIR)/common/Defs.gmk
  29 
  30 #
  31 # Files to compile
  32 #
  33 AUTO_FILES_JAVA_DIRS = com/sun/servicetag
  34 
  35 #
  36 # Rules
  37 #
  38 include $(BUILDDIR)/common/Classes.gmk
  39 
  40 SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
  41 SERVICETAG_RESOURCES_DIR = $(CLASSDESTDIR)/com/sun/servicetag/resources
  42 FILES_copy = $(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
  43              $(SERVICETAG_RESOURCES_DIR)/register.html \
  44              $(SERVICETAG_RESOURCES_DIR)/register_ja.html \
  45              $(SERVICETAG_RESOURCES_DIR)/register_zh_CN.html \
  46              $(SERVICETAG_LIBDIR)/jdk_header.png
  47 
  48 # Add all properties files to the FILES_copy list
  49 SWORDFISH_properties := $(shell \
  50        $(CD) $(SHARE_SRC)/classes/com/sun/servicetag/resources; \
  51        $(FIND) . -name 'javase_*_swordfish.properties' -print ; \
  52     )
  53 FILES_copy += $(shell \
  54    for f in $(SWORDFISH_properties) ; do \
  55        echo $(SERVICETAG_RESOURCES_DIR)/$$f ; \
  56    done \
  57 )
  58 
  59 
  60 #
  61 #OTHER_JAVACFLAGS += -Xlint:unchecked
  62 
  63 build: install-servicetag-lib copy-files
  64 
  65 copy-files: $(FILES_copy)
  66 
  67 $(CLASSBINDIR)/%: $(SHARE_SRC)/classes/%
  68         $(install-file)
  69 
  70 $(SERVICETAG_LIBDIR)/jdk_header.png: $(SHARE_SRC)/classes/com/sun/servicetag/resources/jdk_header.png
  71         $(install-file)
  72         $(call chmod-file, 444)
  73 
  74 install-servicetag-lib:
  75         @$(RM) -rf $(SERVICETAG_LIBDIR)
  76         $(MKDIR) $(SERVICETAG_LIBDIR)
  77 
  78 clean clobber::
  79         @$(RM) $(FILES_copy)
  80 
  81 .PHONY: copy-files