Changeset 278 for trunk/openjdk/Makefile


Ignore:
Timestamp:
Mar 26, 2011, 8:39:20 PM (14 years ago)
Author:
dmik
Message:

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

Location:
trunk/openjdk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk

  • trunk/openjdk/Makefile

    r175 r278  
    11#
    2 # Copyright 1995-2007 Sun Microsystems, Inc.  All Rights Reserved.
     2# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
    33# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44#
    55# This code is free software; you can redistribute it and/or modify it
    66# under the terms of the GNU General Public License version 2 only, as
    7 # published by the Free Software Foundation.  Sun designates this
     7# published by the Free Software Foundation.  Oracle designates this
    88# particular file as subject to the "Classpath" exception as provided
    9 # by Sun in the LICENSE file that accompanied this code.
     9# by Oracle in the LICENSE file that accompanied this code.
    1010#
    1111# This code is distributed in the hope that it will be useful, but WITHOUT
     
    1919# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    2020#
    21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    22 # CA 95054 USA or visit www.sun.com if you need additional information or
    23 # have any questions.
     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.
    2424#
    2525
     
    2727
    2828ifndef TOPDIR
    29   TOPDIR:=$(shell \
    30     if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \
    31       echo "."; \
    32     else \
    33       echo "../.."; \
    34     fi)
    35 endif
    36 
    37 ifndef CONTROL_TOPDIR
    38   CONTROL_TOPDIR=$(TOPDIR)/control
    39   CONTROL_TOPDIR:=$(shell \
    40     if [ -r $(TOPDIR)/control/make/Makefile ]; then \
    41       echo "$(TOPDIR)/control"; \
    42     else \
    43       echo "$(TOPDIR)"; \
    44     fi)
    45 endif
    46 
    47 # Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
    48 OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
    49 OPENJDK_BUILDDIR:=$(shell \
    50   if [ -r $(OPENJDK_SOURCETREE)/control/make/Makefile ]; then \
    51     echo "$(OPENJDK_SOURCETREE)/control/make"; \
    52   elif [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
    53     echo "$(OPENJDK_SOURCETREE)"; \
    54   else \
    55     echo "."; \
    56   fi)
     29  TOPDIR:=.
     30endif
    5731
    5832ifndef JDK_TOPDIR
     
    6337endif
    6438
     39# For start and finish echo lines
     40TITLE_TEXT = Control $(PLATFORM) $(ARCH) $(RELEASE)
     41DATE_STAMP = `$(DATE) '+%y-%m-%d %H:%M'`
     42START_ECHO  = echo "$(TITLE_TEXT) $@ build started: $(DATE_STAMP)"
     43FINISH_ECHO = echo "$(TITLE_TEXT) $@ build finished: $(DATE_STAMP)"
     44
     45default: all
     46
    6547include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk
    66 
    6748include ./make/Defs-internal.gmk
    68 
    69 ifndef TARGETS
    70   TARGETS:=setup build
    71 endif
    72 
     49include ./make/sanity-rules.gmk
     50include ./make/hotspot-rules.gmk
     51include ./make/langtools-rules.gmk
     52include ./make/corba-rules.gmk
     53include ./make/jaxp-rules.gmk
     54include ./make/jaxws-rules.gmk
     55include ./make/jdk-rules.gmk
     56
     57# What "all" means
    7358all::
    74         @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
     59        @$(START_ECHO)
     60
     61all:: sanity
     62
     63ifeq ($(SKIP_FASTDEBUG_BUILD), false)
     64  all:: fastdebug_build
     65endif
     66
     67ifeq ($(SKIP_DEBUG_BUILD), false)
     68  all:: debug_build
     69endif
     70
     71all:: all_product_build
     72
     73all::
     74        @$(FINISH_ECHO)
     75
     76# Everything for a full product build
     77all_product_build::
     78        @$(START_ECHO)
     79
     80ifeq ($(SKIP_PRODUCT_BUILD), false)
     81 
     82  all_product_build:: product_build
     83
     84  ifneq ($(SKIP_COMPARE_IMAGES), true)
     85    all_product_build:: compare-image
     86  endif
     87
     88endif
     89
     90all_product_build::
     91        @$(FINISH_ECHO)
     92
     93# Generis build of basic repo series
     94generic_build_repo_series::
    7595        $(MKDIR) -p $(OUTPUTDIR)
    76 
    77 # Rules for sanity checks
    78 include ./make/sanity-rules.gmk
     96        $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
     97
     98ifeq ($(BUILD_LANGTOOLS), true)
     99  generic_build_repo_series:: langtools
     100  clobber:: langtools-clobber
     101endif
     102
     103ifeq ($(BUILD_CORBA), true)
     104  generic_build_repo_series:: corba
     105  clobber:: corba-clobber
     106endif
     107
     108ifeq ($(BUILD_JAXP), true)
     109  generic_build_repo_series:: jaxp
     110  clobber:: jaxp-clobber
     111endif
     112
     113ifeq ($(BUILD_JAXWS), true)
     114  generic_build_repo_series:: jaxws
     115  clobber:: jaxws-clobber
     116endif
     117
     118ifeq ($(BUILD_HOTSPOT), true)
     119  generic_build_repo_series:: $(HOTSPOT)
     120  clobber:: hotspot-clobber
     121endif
     122
     123ifeq ($(BUILD_JDK), true)
     124  generic_build_repo_series:: $(JDK_JAVA_EXE)
     125  clobber:: jdk-clobber
     126endif
     127
     128# The debug build, fastdebug or debug. Needs special handling.
     129#
     130#   DEBUG_NAME is fastdebug or debug
     131#   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
     132#
     133#   NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME).
     134#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may
     135#         not be the same location.
     136#
     137
     138# Location of fresh bootdir output
     139ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
     140FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image
     141FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image
     142 
     143create_fresh_product_bootdir: FRC
     144        @$(START_ECHO)
     145        $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
     146                GENERATE_DOCS=false \
     147                BOOT_CYCLE_SETTINGS= \
     148                build_product_image
     149        @$(FINISH_ECHO)
     150
     151create_fresh_debug_bootdir: FRC
     152        @$(START_ECHO)
     153        $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
     154                GENERATE_DOCS=false \
     155                BOOT_CYCLE_DEBUG_SETTINGS= \
     156                build_debug_image
     157        @$(FINISH_ECHO)
     158
     159create_fresh_fastdebug_bootdir: FRC
     160        @$(START_ECHO)
     161        $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \
     162                GENERATE_DOCS=false \
     163                BOOT_CYCLE_DEBUG_SETTINGS= \
     164                build_fastdebug_image
     165        @$(FINISH_ECHO)
     166
     167# Create boot image?
     168ifeq ($(SKIP_BOOT_CYCLE),false)
     169  ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
     170    DO_BOOT_CYCLE=true
     171  endif
     172endif
     173
     174ifeq ($(DO_BOOT_CYCLE),true)
     175 
     176  # Create the bootdir to use in the build
     177  product_build:: create_fresh_product_bootdir
     178  debug_build:: create_fresh_debug_bootdir
     179  fastdebug_build:: create_fresh_fastdebug_bootdir
     180
     181  # Define variables to be used now for the boot jdk
     182  BOOT_CYCLE_SETTINGS= \
     183     ALT_BOOTDIR=$(FRESH_BOOTDIR) \
     184     ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR)
     185  BOOT_CYCLE_DEBUG_SETTINGS= \
     186     ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \
     187     ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR)
     188
     189else
     190
     191  # Use the supplied ALT_BOOTDIR as the boot
     192  BOOT_CYCLE_SETTINGS=
     193  BOOT_CYCLE_DEBUG_SETTINGS=
     194
     195endif
     196
     197build_product_image:
     198        @$(START_ECHO)
     199        $(MAKE) \
     200                SKIP_FASTDEBUG_BUILD=true \
     201                SKIP_DEBUG_BUILD=true \
     202                $(BOOT_CYCLE_SETTINGS) \
     203                generic_build_repo_series
     204        @$(FINISH_ECHO)
     205
     206#   NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME).
     207#         Due to the use of short paths in $(ABS_OUTPUTDIR), this may
     208#         not be the same location.
     209
     210generic_debug_build:
     211        @$(START_ECHO)
     212        $(MAKE) \
     213                ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \
     214                DEBUG_NAME=$(DEBUG_NAME) \
     215                GENERATE_DOCS=false \
     216                $(BOOT_CYCLE_DEBUG_SETTINGS) \
     217                generic_build_repo_series
     218        @$(FINISH_ECHO)
     219
     220build_debug_image:
     221        $(MAKE) DEBUG_NAME=debug generic_debug_build
     222
     223build_fastdebug_image:
     224        $(MAKE) DEBUG_NAME=fastdebug generic_debug_build
     225
     226# Build final image
     227product_build:: build_product_image
     228debug_build:: build_debug_image
     229fastdebug_build:: build_fastdebug_image
     230
     231clobber::
     232        $(RM) -r $(OUTPUTDIR)/*
     233        $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-debug/*
     234        $(RM) -r $(OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-fastdebug/*
     235        -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
     236
     237clean: clobber
     238
     239#
     240# Dev builds
     241#
    79242
    80243dev : dev-build
     
    87250        $(MAKE) DEV_ONLY=true clobber
    88251
    89 # Rules for various components
    90 include ./make/hotspot-rules.gmk
    91 include ./make/motif-rules.gmk
    92 include ./make/langtools-rules.gmk
    93 include ./make/corba-rules.gmk
    94 include ./make/jaxp-rules.gmk
    95 include ./make/jaxws-rules.gmk
    96 include ./make/jdk-rules.gmk
    97 include ./make/install-rules.gmk
    98 include ./make/sponsors-rules.gmk
    99 include ./make/deploy-rules.gmk
    100 
    101 all:: $(TARGETS)
    102 
    103 setup: openjdk_check
    104         $(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
    105 
    106 # Check on whether we really can build the openjdk, need source etc.
    107 openjdk_check: FRC
    108 ifneq ($(SKIP_OPENJDK_BUILD), true)
    109         @$(ECHO) " "
    110         @$(ECHO) "================================================="
    111         @if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
    112             $(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
    113             exit 1; \
    114         else \
    115             $(ECHO) "OpenJDK will be built after JDK is built"; \
    116             $(ECHO) "  OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
    117         fi
    118         @$(ECHO) "================================================="
    119         @$(ECHO) " "
    120 endif
    121 
    122 build:: sanity
    123 
    124 clobber::
    125 
    126 ifeq ($(BUILD_LANGTOOLS), true)
    127   build:: langtools
    128   clobber:: langtools-clobber
    129 endif
    130 
    131 ifeq ($(BUILD_CORBA), true)
    132   build:: corba
    133   clobber:: corba-clobber
    134 endif
    135 
    136 ifeq ($(BUILD_JAXP), true)
    137   build:: jaxp
    138   clobber:: jaxp-clobber
    139 endif
    140 
    141 ifeq ($(BUILD_JAXWS), true)
    142   build:: jaxws
    143   clobber:: jaxws-clobber
    144 endif
    145 
    146 ifeq ($(BUILD_HOTSPOT), true)
    147   build:: $(HOTSPOT)
    148   clobber:: hotspot-clobber
    149 endif
    150 
    151 ifeq ($(BUILD_MOTIF), true)
    152   build:: $(MOTIF)
    153   clobber:: motif-clobber
    154 endif
    155 
    156 ifeq ($(BUILD_JDK), true)
    157   build:: $(JDK_JAVA_EXE)
    158   clobber:: jdk-clobber
    159 endif
    160 
    161 ifeq ($(BUILD_DEPLOY), true)
    162   build:: $(DEPLOY)
    163   clobber:: deploy-clobber
    164 endif
    165 
    166 #
    167 # Generic debug build, fastdebug or debug. Needs special handling.
    168 #  Note that debug builds do NOT do INSTALL steps, but must be done
    169 #  after the product build and before the INSTALL step of the product build.
    170 #
    171 #   DEBUG_NAME is fastdebug or debug
    172 #   ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix
    173 #   The resulting j2sdk-image is used by the install makefiles to create a
    174 #     debug install bundle jdk-*-debug-** bundle (tar or zip)
    175 #     which will install in the debug or fastdebug subdirectory of the
    176 #     normal product install area.
    177 #     The install process needs to know what the DEBUG_NAME is, so
    178 #     look for INSTALL_DEBUG_NAME in the install rules.
    179 #
    180 
    181 COMMON_DEBUG_FLAGS= \
    182         DEBUG_NAME=$(DEBUG_NAME) \
    183         ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
    184         NO_DOCS=true
    185 
    186 product_build:
    187         @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
    188         $(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all
    189         @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
    190 
    191 generic_debug_build:
    192         @$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'`
    193         $(MAKE) $(COMMON_DEBUG_FLAGS) $(TARGETS)
    194         @$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'`
    195 
    196 debug_build:
    197         $(MAKE) DEBUG_NAME=debug TARGETS="$(TARGETS)" generic_debug_build
    198 
    199 fastdebug_build:
    200         $(MAKE) DEBUG_NAME=fastdebug TARGETS="$(TARGERS)" generic_debug_build
    201 
    202 ifeq ($(SKIP_FASTDEBUG_BUILD), false)
    203   all:: fastdebug_build
    204 endif
    205 
    206 ifeq ($(SKIP_DEBUG_BUILD), false)
    207   all:: debug_build
    208 endif
    209 
    210 ifeq ($(BUILD_JDK), true)
    211   ifeq ($(BUNDLE_RULES_AVAILABLE), true)
    212     all:: openjdk-binary-plugs-bundles
    213   endif
    214 endif
    215 
    216 ifeq ($(BUILD_INSTALL), true)
    217   all :: $(INSTALL)
    218   clobber:: install-clobber
    219 endif
    220 
    221 ifeq ($(BUILD_SPONSORS), true)
    222   all :: $(SPONSORS)
    223   clobber:: sponsors-clobber
    224 endif
    225 
    226 ifneq ($(SKIP_COMPARE_IMAGES), true)
    227   all :: compare-image
    228 endif
    229 
    230 ifneq ($(SKIP_OPENJDK_BUILD), true)
    231   all :: openjdk_build
    232 endif
    233 
    234 # If we have bundle rules, we have a chance here to do a complete cycle
    235 #   build, of production and open build.
    236 # FIXUP: We should create the openjdk source bundle and build that?
    237 #   But how do we reliable create or get at a formal openjdk source tree?
    238 #   The one we have needs to be trimmed of built bits and closed dirs.
    239 #   The repositories might not be available.
    240 #   The openjdk source bundle is probably not available.
    241 
    242 ifneq ($(SKIP_OPENJDK_BUILD), true)
    243   ifeq ($(BUILD_JDK), true)
    244     ifeq ($(BUNDLE_RULES_AVAILABLE), true)
    245 
    246 OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
    247 OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
    248 OPENJDK_BUILD_NAME \
    249   = openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
    250 OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
    251 BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
    252 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
    253   OPENJDK_BOOTDIR=$(BOOTDIR)
    254   OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
    255 else
    256   OPENJDK_BOOTDIR=$(BUILT_IMAGE)
    257   OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
    258 endif
    259 
    260 openjdk_build:
    261         @$(ECHO) " "
    262         @$(ECHO) "================================================="
    263         @$(ECHO) "Starting openjdk build"
    264         @$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
    265         @$(ECHO) "================================================="
    266         @$(ECHO) " "
    267         $(RM) -r $(OPENJDK_OUTPUTDIR)
    268         $(MKDIR) -p $(OPENJDK_OUTPUTDIR)
    269         ($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
    270           OPENJDK=true \
    271           ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
    272           ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
    273           ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
    274           ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
    275           ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
    276                 product_build )
    277         $(RM) $(OPENJDK_BUILD_BINARY_ZIP)
    278         ( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
    279           $(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
    280         $(RM) -r $(OPENJDK_OUTPUTDIR)
    281         @$(ECHO) " "
    282         @$(ECHO) "================================================="
    283         @$(ECHO) "Finished openjdk build"
    284         @$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
    285         @$(ECHO) "================================================="
    286         @$(ECHO) " "
    287 
    288     endif
    289   endif
    290 endif
    291 
    292 clobber::
    293         $(RM) -r $(OUTPUTDIR)/*
    294         $(RM) -r $(OUTPUTDIR)-debug/*
    295         $(RM) -r $(OUTPUTDIR)-fastdebug/*
    296         -($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE))
    297 
    298 clean: clobber
    299 
    300 all::
    301         @$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'`
    302 
    303252#
    304253# Quick jdk verification build
     
    312261#
    313262jdk_fastdebug_only:
    314         $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \
    315             BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build
    316 
    317 #
    318 # Quick deploy verification fastdebug build
    319 #
    320 deploy_fastdebug_only:
    321         $(MAKE) \
    322             DEBUG_NAME=fastdebug \
    323             BUILD_HOTSPOT=false \
    324             BUILD_JDK=false \
    325             BUILD_LANGTOOLS=false \
    326             BUILD_CORBA=false \
    327             BUILD_JAXP=false \
    328             BUILD_JAXWS=false \
    329             BUILD_INSTALL=false \
    330             BUILD_SPONSORS=false \
    331             generic_debug_build
     263        $(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false generic_debug_build
    332264
    333265#
     
    490422
    491423################################################################
    492 # Source and binary plug bundling
    493 ################################################################
    494 ifeq ($(BUNDLE_RULES_AVAILABLE), true)
    495   include $(BUNDLE_RULES)
    496 endif
    497 
    498 ################################################################
    499424# Cycle build. Build the jdk, use it to build the jdk again.
    500425################################################################
     
    507432
    508433################################################################
     434# rule to test
     435################################################################
     436
     437.NOTPARALLEL: test
     438
     439test: test_clean test_start test_summary
     440
     441test_start:
     442        @$(ECHO) "Tests started at `$(DATE)`"
     443
     444test_clean:
     445        $(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
     446
     447test_summary: $(OUTPUTDIR)/test_failures.txt
     448        @$(ECHO) "#################################################"
     449        @$(ECHO) "Tests completed at `$(DATE)`"
     450        @( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \
     451          || $(ECHO) "No TEST STATS seen in log" )
     452        @$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt"
     453        @$(ECHO) "#################################################"
     454        @if [ -s $< ] ; then                                           \
     455          $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \
     456          $(CAT) $<;                                                   \
     457          exit 1;                                                      \
     458        else                                                           \
     459          $(ECHO) "Success! No failures detected";                     \
     460        fi
     461
     462# Get failure list from log
     463$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
     464        @$(RM) $@
     465        @( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) > $@
     466
     467# Get log file of all tests run
     468JDK_TO_TEST := $(shell                                                  \
     469  if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then                       \
     470    $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image";                             \
     471  elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then                             \
     472    $(ECHO) "$(ABS_OUTPUTDIR)";                                         \
     473  elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then   \
     474    $(ECHO) "$(PRODUCT_HOME)";                                          \
     475  fi                                                                    \
     476)
     477$(OUTPUTDIR)/test_log.txt:
     478        $(RM) $@
     479        ( $(CD) test &&                                     \
     480          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) \
     481        ) | tee $@
     482
     483################################################################
    509484# JPRT rule to build
    510485################################################################
     
    516491################################################################
    517492
    518 .PHONY: all build what clobber insane \
    519         fastdebug_build debug_build product_build setup \
    520         dev dev-build dev-sanity dev-clobber
    521 
    522 # FIXUP: Old j2se targets
    523 j2se_fastdebug_only: jdk_fastdebug_only
    524 j2se_only: jdk_only
     493.PHONY: all  test test_start test_summary test_clean \
     494        generic_build_repo_series \
     495        what clobber insane \
     496        dev dev-build dev-sanity dev-clobber \
     497        product_build \
     498        fastdebug_build \
     499        debug_build  \
     500        build_product_image  \
     501        build_debug_image  \
     502        build_fastdebug_image \
     503        create_fresh_product_bootdir \
     504        create_fresh_debug_bootdir \
     505        create_fresh_fastdebug_bootdir \
     506        generic_debug_build
    525507
    526508# Force target
Note: See TracChangeset for help on using the changeset viewer.