corba/make/Makefile
author jbachorik
Wed, 24 Oct 2012 20:44:07 +0100
changeset 14319 0b9fd764d40d
parent 7672 aec650969dd5
child 21859 79297dc5e081
permissions -rw-r--r--
6976971: TEST: javax/management/remote/mandatory/URLTest.java should be re-integrated Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
#
7672
aec650969dd5 6962318: Update copyright year
ohair
parents: 6551
diff changeset
     2
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
#
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
#
5555
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
b2b5ed3f0d0d 6943119: Rebrand source copyright notices
ohair
parents: 3871
diff changeset
    23
# questions.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
# Makefile for building the corba workspace.
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
#
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
BUILDDIR=.
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
include $(BUILDDIR)/common/Defs.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
include $(BUILDDIR)/common/CancelImplicits.gmk
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
#----- commands
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
CHMOD = chmod
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
CP = cp
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
ECHO = echo # FIXME
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
FIND = find
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
MKDIR = mkdir
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
SED = sed
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
ZIP = zip
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
#-----  locations and deliverables
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
TOPDIR=..
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
SRC_BIN_DIR = $(TOPDIR)/src/share/bin
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
SRC_CLASSES_DIR = $(TOPDIR)/src/share/classes
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
ifdef ALT_OUTPUTDIR
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
  OUTPUTDIR = $(ALT_OUTPUTDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
  BUILD_DIR = $(ALT_OUTPUTDIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
  DIST_DIR = $(ALT_OUTPUTDIR)/dist
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
else
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
  OUTPUTDIR = ..
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
  BUILD_DIR = $(TOPDIR)/build/$(PLATFORM)-$(ARCH)
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
  DIST_DIR = $(TOPDIR)/dist
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
CLASSES_DIR = $(BUILD_DIR)/classes
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
GENSRC_DIR = $(BUILD_DIR)/gensrc
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
LIB_DIR = $(DIST_DIR)/lib
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
#-----
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
ifndef JDK_MAJOR_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
  JDK_MAJOR_VERSION = 1
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
ifndef JDK_MINOR_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
  JDK_MINOR_VERSION = 7
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
ifndef JDK_MICRO_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
  JDK_MICRO_VERSION = 0
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
ifndef JDK_VERSION
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
  JDK_VERSION = $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
ifndef MILESTONE
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
  MILESTONE = internal
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
ifneq ($(MILESTONE),fcs)
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
  RELEASE       = $(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
else
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
  RELEASE       = $(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
ifdef BUILD_NUMBER
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
  FULL_VERSION = $(RELEASE)-$(BUILD_NUMBER)
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
else
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
  BUILD_NUMBER = b00
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
  USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`)
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
  FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER)
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
#----- useful macros
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
SOURCE_LEVEL = 5
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
BOOTSTRAP_TARGET_LEVEL = 5
2961
bf41fd0e654e 6827026: Change javac source and target default to 7
jjg
parents: 2195
diff changeset
   108
bf41fd0e654e 6827026: Change javac source and target default to 7
jjg
parents: 2195
diff changeset
   109
ifdef TARGET_CLASS_VERSION
bf41fd0e654e 6827026: Change javac source and target default to 7
jjg
parents: 2195
diff changeset
   110
    TARGET_LEVEL = $(TARGET_CLASS_VERSION)
bf41fd0e654e 6827026: Change javac source and target default to 7
jjg
parents: 2195
diff changeset
   111
else
3357
554aac3029bc 6854244: change source/target used to compile JDK to 7
jjg
parents: 2961
diff changeset
   112
    TARGET_LEVEL = 7
2961
bf41fd0e654e 6827026: Change javac source and target default to 7
jjg
parents: 2195
diff changeset
   113
endif
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
ifndef TARGET_JAVA
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
  TARGET_JAVA = java
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
endif
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
SELF = $(lastword $(MAKEFILE_LIST))
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
# for jdk, we generate the following:
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
# dist/lib/classes.jar:
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
#       corba recompiled to run on the target JDK,
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
#       ready for inclusion in rt.jar
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
# dist/lib/src.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   126
#       .properties and .java files for classes in classes.jar,
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
#       ready for jdk src.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
# dist/lib/bin.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
#       corba specific binaries: orb.idl, ir.idl
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
# Default target
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
default: all
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
#----- classes.jar
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
CLASSES_JAR = $(LIB_DIR)/classes.jar
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
$(CLASSES_JAR):
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
	$(MKDIR) -p $(@D)
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
	$(BOOT_JAR_CMD) -cf $@ -C $(CLASSES_DIR) .
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
#----- src.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3359
diff changeset
   143
SRC_ZIP_FILES = $(shell $(FIND) $(SRC_CLASSES_DIR) \( -name \*-template \) -prune -o -type f -print )
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
02bb8761fcce Initial load
duke
parents:
diff changeset
   145
SRC_ZIP = $(LIB_DIR)/src.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
$(SRC_ZIP): $(SRC_ZIP_FILES)
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
	abs_src_zip=`cd $(@D) ; pwd`/$(@F) ; \
3871
3d528461f61d 6875240: Reduce Makefile build time by limiting repeated exec's (mostly for cygwin building)
ohair
parents: 3359
diff changeset
   148
	( cd $(SRC_CLASSES_DIR) ; $(FIND) . \( -name \*-template \) -prune -o -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ; \
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
	( cd $(GENSRC_DIR) ; $(FIND) . -type f -print | $(ZIP) -q $$abs_src_zip -@ ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
#----- bin.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
BIN_ZIP_FILES = $(BUILD_DIR/lib/orb.idl $(BUILD_DIR)/lib/ir.idl
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
BIN_ZIP = $(LIB_DIR)/bin.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
$(BIN_ZIP): $(BIN_ZIP_FILES)
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
	abs_bin_zip=`cd $(@D) ; pwd`/$(@F) ; \
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
	( cd $(BUILD_DIR) ; $(FIND) lib -name "*.idl" -print | $(ZIP) -q $$abs_bin_zip -@ ) ;
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
# CORBA
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
SUBDIRS = tools javax org sun com
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
build:
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
	$(SUBDIRS-loop)
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
all : build $(CLASSES_JAR) $(SRC_ZIP) $(BIN_ZIP)
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
clean clobber:
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
	$(RM) -r $(BUILD_DIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
	$(RM) -r $(DIST_DIR)
02bb8761fcce Initial load
duke
parents:
diff changeset
   173
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
#-------------------------------------------------------------------
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
# Targets for Sun's internal JPRT build system
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
CD = cd
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
ZIP = zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
	( $(CD) $(OUTPUTDIR) && \
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
	  $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
#-------------------------------------------------------------------
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
# Phonies to avoid accidents.
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
#
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
.PHONY: all build clean clobber debug jprt_build_product jprt_build_debug jprt_build_fastdebug