jdk/makefiles/altclasses/Makefile
changeset 12317 9670c1610c53
equal deleted inserted replaced
12316:ba6b7a51e226 12317:9670c1610c53
       
     1 #
       
     2 # Copyright (c) 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 alternate runtime classes (not used by default)
       
    28 #
       
    29 
       
    30 BUILDDIR = ..
       
    31 
       
    32 PRODUCT = altclasses
       
    33 
       
    34 include $(BUILDDIR)/common/Defs.gmk
       
    35 
       
    36 # Root of alternate class sources
       
    37 
       
    38 ALTCLASSES_SRCDIR = $(CLOSED_SRC)/share/altclasses
       
    39 
       
    40 # Alternate runtime classes
       
    41 
       
    42 ALTRT_JAR_FILE = $(LIBDIR)/alt-rt.jar
       
    43 ALTRT_JAR_SOURCE_FILE = $(TEMPDIR)/alt-rt.jarsrclist
       
    44 ALTRT_JAR_SOURCES = $(wildcard $(ALTCLASSES_SRCDIR)/java/*/*.java)
       
    45 
       
    46 # Use a special file suffix for the file that holds the source list
       
    47 
       
    48 .SUFFIXES: .jarsrclist
       
    49 
       
    50 # Build rules
       
    51 
       
    52 all build: 
       
    53 	@if [ -d $(ALTCLASSES_SRCDIR) ] ; then \
       
    54 	   $(MAKE) $(ALTRT_JAR_FILE); \
       
    55 	fi
       
    56 
       
    57 # Source list file creation
       
    58 
       
    59 $(ALTRT_JAR_SOURCE_FILE): $(ALTRT_JAR_SOURCES) FRC
       
    60 	$(prep-target)
       
    61 	$(ECHO) $(ALTRT_JAR_SOURCES) > $@
       
    62 
       
    63 clean clobber::
       
    64 	$(RM) $(ALTRT_JAR_FILE) $(ALTRT_JAR_SOURCE_FILE) 
       
    65 	$(RM) -r $(ALTRT_JAR_SOURCE_FILE).classes
       
    66 
       
    67 include $(BUILDDIR)/common/Classes.gmk
       
    68 
       
    69 # Pattern rule to turn a source list file into a jar file
       
    70 $(LIBDIR)/%.jar : $(TEMPDIR)/%.jarsrclist
       
    71 	$(prep-target)
       
    72 	$(RM) -r $(<).classes
       
    73 	$(MKDIR) -p $(<).classes
       
    74 	$(JAVAC_CMD) -implicit:none -d $(<).classes @$<
       
    75 	$(BOOT_JAR_CMD) cf $@ -C $(<).classes . $(BOOT_JAR_JFLAGS)
       
    76 
       
    77 # Force target
       
    78 
       
    79 FRC:
       
    80 
       
    81 # Non file targets
       
    82 
       
    83 .PHONY: all build clean clobber
       
    84