NewMakefile.gmk
author sherman
Tue, 27 Nov 2012 21:51:26 -0800
changeset 14673 9ed95934188b
parent 14111 2a82ecb35fc7
child 15053 64278cb83950
permissions -rw-r--r--
4235519: Make sun.misc.BASE64{De,En}coder classes public Summary: to add java.util.Base64 Reviewed-by: alanb, mduigou
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     2
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
# accompanied this code).
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
# questions.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# Utilities used in this Makefile
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
BASENAME=basename
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
CAT=cat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
CD=cd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
CMP=cmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
CP=cp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
ECHO=echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
MKDIR=mkdir
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    34
PRINTF=printf
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
PWD=pwd
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    36
TAR=tar
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
ifeq ($(PLATFORM),windows)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    38
  ZIP=zip
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    40
  # store symbolic links as the link
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    41
  ZIP=zip -y
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    42
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    43
# Insure we have a path that looks like it came from pwd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    44
#   (This is mostly for Windows sake and drive letters)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    45
define UnixPath # path
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    46
$(shell (cd "$1" && $(PWD)))
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    47
endef
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    48
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
# Current root directory
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    50
CURRENT_DIRECTORY := $(shell $(PWD))
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    51
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    52
# Build directory root
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    54
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
# All configured Makefiles to run
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    56
ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    58
# All bundles to create
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    59
ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    60
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    61
# Build all the standard 'all', 'images', and 'clean' targets
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    62
all images clean: checks
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    63
	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    64
	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    65
	fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    66
	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    67
	  $(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    68
	  $(CD) $${bdir} && $(MAKE) $@ ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    69
	done
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    70
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    71
# TBD: Deploy input
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    72
$(BUILD_DIR_ROOT)/.deploy_input:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    73
	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    74
	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    75
	fi
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    76
	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    77
	  if [ deploy/make/Makefile ] ; then \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    78
	    echo "Attempting deploy build." ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    79
	    ( \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    80
	      $(RM) -r $${bdir}/deploy_input ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    81
	      $(MKDIR) -p $${bdir}/deploy_input ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    82
	      ( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    83
	        | ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    84
	    ) ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    85
	  fi; \
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    86
	done
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    87
	touch $@
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    88
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    89
# TBD: Deploy images
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    90
deploy: $(BUILD_DIR_ROOT)/.deploy_input
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    91
	@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    92
	  $(ECHO) "ERROR: No configurations to build"; exit 1; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    93
	fi
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    94
	@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    95
	  if [ deploy/make/Makefile ] ; then \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    96
	    echo "Attempting deploy build." ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    97
	    ( \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    98
	      $(CD) deploy/make && \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    99
	      $(MAKE) \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   100
	        ABS_OUTPUTDIR=$${bdir}/deploy_input \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   101
	        OUTPUTDIR=$${bdir}/deploy_input \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   102
	    ) ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   103
	  fi; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   104
	done
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   105
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   106
# TBD: Install bundles
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   107
install:
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   108
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   109
# Bundle creation
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   110
bundles:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   111
	@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   112
	  $(ECHO) "ERROR: No images to bundle"; exit 1; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   113
	fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   114
	@for i in $(ALL_IMAGE_DIRS) ; do \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   115
          $(MKDIR) -p $${i}/../../bundles && \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   116
          $(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   117
	  $(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ."  && \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   118
	  $(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   119
	done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   120
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   121
# Clobber all the built files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   122
clobber::
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   123
	$(RM) -r $(BUILD_DIR_ROOT)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   124
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   125
# Make various checks to insure the build will be successful
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   126
#   Possibilities:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   127
#     * Check that if any closed repo is provided, they all must be.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   128
#     * Check that all open repos exist, at least until we are ready for some
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   129
#       kind of partial build.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   130
checks:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   131
	@$(ECHO) "No checks yet"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   132
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   133
# Keep track of user targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   134
USER_TARGETS += all deploy install images clean clobber checks
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   135
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   136
###########################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   137
# To help in adoption of the new configure&&make build process, a bridge
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   138
#   build will use the old settings to run configure and do the build.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   139
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   140
# Build with the configure bridge
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   141
bridgeBuild: bridge2configure images
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   142
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   143
# Bridge from old Makefile ALT settings to configure options
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   144
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   145
	bash ./configure $(strip $(shell $(CAT) $<))
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   146
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   147
# Create a file with configure options created from old Makefile mechanisms.
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   148
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   149
	$(RM) $@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   150
	$(CP) $< $@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   151
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   152
# Use this file to only change when obvious things have changed
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   153
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   154
	$(RM) $@.tmp
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   155
	$(MKDIR) -p $(BUILD_DIR_ROOT)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   156
	@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   157
ifdef ARCH_DATA_MODEL
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   158
	@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   159
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   160
ifdef ALT_PARALLEL_COMPILE_JOBS
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   161
	@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   162
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   163
ifdef ALT_BOOTDIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   164
	@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   165
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   166
ifdef ALT_CUPS_HEADERS_PATH
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   167
	@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   168
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   169
ifdef ALT_FREETYPE_HEADERS_PATH
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   170
	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   171
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   172
	@if [ -f $@ ] ; then \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   173
          if ! $(CMP) $@ $@.tmp > /dev/null ; then \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   174
            $(CP) $@.tmp $@ ; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   175
          fi ; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   176
        else \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   177
          $(CP) $@.tmp $@ ; \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   178
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   179
	$(RM) $@.tmp
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   180
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   181
# Clobber all the built files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   182
clobber:: bridge2clobber
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   183
bridge2clobber::
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   184
	$(RM) $(BUILD_DIR_ROOT)/.bridge2*
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   185
	$(RM) $(BUILD_DIR_ROOT)/.deploy_input
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   186
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   187
# Keep track of phony targets
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   188
PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   189
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   190
###########################################################################
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   191
# Sanity checks (history target)
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   192
#
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   193
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   194
sanity: checks
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   195
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   196
# Keep track of user targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   197
USER_TARGETS += sanity
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   198
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   199
###########################################################################
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   200
# Javadocs
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   201
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   202
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   203
javadocs:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   204
	cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   205
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   206
# Keep track of user targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   207
USER_TARGETS += javadocs
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   208
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   209
###########################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   210
# JPRT targets
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   211
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   212
ifndef JPRT_ARCHIVE_BUNDLE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   213
  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   214
endif
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   215
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   216
jprt_build_product: DEBUG_LEVEL=release
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   217
jprt_build_product: BUILD_DIRNAME=*-release
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   218
jprt_build_product: jprt_build_generic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   219
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   220
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   221
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   222
jprt_build_fastdebug: jprt_build_generic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   223
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   224
jprt_build_debug: DEBUG_LEVEL=slowdebug
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   225
jprt_build_debug: BUILD_DIRNAME=*-debug
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   226
jprt_build_debug: jprt_build_generic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   227
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   228
jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   229
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   230
$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   231
	$(MKDIR) -p $(@D)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   232
	$(RM) $@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   233
	$(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   234
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   235
# Keep track of phony targets
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   236
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   237
              jprt_build_generic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   238
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   239
###########################################################################
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   240
# Help target
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   241
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   242
HELP_FORMAT=%12s%s\n
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   243
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   244
help:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   245
	@$(PRINTF) "# JDK Makefile\n"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   246
	@$(PRINTF) "#\n"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   247
	@$(PRINTF) "# Usage: make [Target]\n"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   248
	@$(PRINTF) "#\n"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   249
	@$(PRINTF) "#   $(HELP_FORMAT)" "Target   " "Description"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   250
	@$(PRINTF) "#   $(HELP_FORMAT)" "------   " "-----------"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   251
	@for i in $(USER_TARGETS) ; do \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   252
	  $(MAKE) help_$${i} ; \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   253
	done
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   254
	@$(PRINTF) "#\n"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   255
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   256
help_all:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   257
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   258
	"Build the entire jdk but not the images"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   259
help_images:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   260
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   261
	"Create the jdk images for the builds"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   262
help_deploy:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   263
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   264
	"Create the jdk deploy images from the jdk images"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   265
help_install:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   266
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   267
	"Create the jdk install bundles from the deploy images"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   268
help_clean:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   269
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   270
	"Clean and prepare for a fresh build from scratch"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   271
help_clobber:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   272
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   273
	"Clean and also purge any hidden derived data"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   274
help_checks:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   275
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   276
	"Perform various checks to make sure we can build"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   277
help_sanity:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   278
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   279
	"Same as 'make checks'"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   280
help_javadocs:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   281
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   282
	"Build the javadocs"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   283
help_help:
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   284
	@$(PRINTF) "#   $(HELP_FORMAT)" "$(subst help_,,$@) - " \
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   285
	"Print out the help messages"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   286
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   287
# Keep track of user targets
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   288
USER_TARGETS += help
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   289
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   290
###########################################################################
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   291
# Phony targets
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
   292
.PHONY: $(PHONY_LIST) $(USER_TARGETS)
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   293
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   294
# Force target
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   295
FRC: