1 #
   2 # Copyright (c) 2000, 2010, 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
  23 # questions.
  24 #
  25 
  26 #
  27 # Makefile for building all of JPS (Java Print Service) API
  28 #
  29 
  30 BUILDDIR = ../..
  31 PACKAGE = javax.print
  32 PRODUCT = sun
  33 include $(BUILDDIR)/common/Defs.gmk
  34 
  35 #
  36 # Files to compile
  37 #
  38 AUTO_FILES_JAVA_DIRS = javax/print sun/print
  39 
  40 #
  41 # Files that just need cp.
  42 #
  43 SERVICEDIR = $(CLASSBINDIR)/META-INF/services
  44 
  45 FILES_copy = \
  46         $(SERVICEDIR)/javax.print.StreamPrintServiceFactory \
  47         $(SERVICEDIR)/javax.print.PrintServiceLookup
  48 
  49 FILES_mkdirs = \
  50         $(CLASSBINDIR)/META-INF \
  51         $(CLASSBINDIR)/META-INF/services
  52 
  53 FILES_copydirs = \
  54         $(FILES_mkdirs)
  55 
  56 #
  57 # Resources
  58 #
  59 LOCALE_SET_DEFINITION = jre
  60 RESOURCE_BUNDLES_COMPILED_PROPERTIES = sun/print/resources/serviceui.properties
  61 
  62 #
  63 # Rules
  64 #
  65 include $(BUILDDIR)/common/Classes.gmk
  66 
  67 #
  68 # Rules that copy files.
  69 #
  70 
  71 build: copy-files properties
  72 
  73 _PSFONTPROPS = \
  74         psfontj2d.properties            \
  75         psfont.properties.ja            \
  76 
  77 PSFONTPROPS_SRC = $(SHARE_SRC)/classes/sun/print
  78 PSFONTPROPS       = $(_PSFONTPROPS:%=$(LIBDIR)/%)
  79 
  80 _RESOURCES_PRINT = \
  81         orientLandscape.png                \
  82         orientPortrait.png                \
  83         orientRevLandscape.png                \
  84         orientRevPortrait.png                \
  85         oneside.png                        \
  86         duplex.png                        \
  87         tumble.png
  88 
  89 
  90 RESDIR_PRINT    = $(CLASSBINDIR)/sun/print/resources
  91 RESOURCES_PRINT = $(_RESOURCES_PRINT:%=$(RESDIR_PRINT)/%)
  92 
  93 $(LIBDIR)/%: $(PSFONTPROPS_SRC)/% $(FONTPROPS)
  94         $(install-file)
  95 
  96 $(RESDIR_PRINT)/%: $(SHARE_SRC)/classes/sun/print/resources/%
  97         $(install-file)
  98 
  99 properties: $(LIBDIR) $(PSFONTPROPS) $(RESOURCES_PRINT)
 100 
 101 properties.clean:
 102         $(RM) $(PSFONTPROPS)
 103         $(RM) -r $(RESDIR_PRINT)
 104 
 105 copy-files: $(FILES_copy)
 106 
 107 $(SERVICEDIR)/%: $(PLATFORM_SRC)/classes/sun/print/services/%
 108         $(install-file)
 109 
 110 #
 111 # Clean up internal-use-only package.
 112 #
 113 clean::
 114         $(RM) -r $(CLASSDESTDIR)/javax/print $(CLASSDESTDIR)/sun/print
 115 
 116 .PHONY: copy-files