jaxp/make/Makefile
author dcherepanov
Thu, 09 Jul 2009 15:18:50 -0400
changeset 3233 abdab1f90b46
parent 2967 faa3111c009c
child 3879 0d9209bdf36c
permissions -rw-r--r--
6759726: TrayIcon constructor throws NPE instead of documented IAE Reviewed-by: art
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
#
2204
a2ef5d8b69d0 6814575: Update copyright year
xdono
parents: 721
diff changeset
     2
# Copyright 2007-2009 Sun Microsystems, Inc.  All Rights Reserved.
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
#
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
# have any questions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
# Makefile for jaxp: wrapper around Ant build.xml file
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
#    This little rule is only understood by Sun's make, and is harmless
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
#    when seen by the GNU make tool. If using Sun's make, this causes the
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
#    make command to fail.
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
#
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
ifdef QUIET
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
  ANT_OPTIONS += -quiet
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
ifdef VERBOSE
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
  ANT_OPTIONS += -verbose
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
ifdef JDK_VERSION
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
  ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
endif 
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
ifdef FULL_VERSION
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
  ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
endif 
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
ifdef MILESTONE
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
  ANT_OPTIONS += -Dmilestone=$(MILESTONE)
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
ifdef BUILD_NUMBER
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
  ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
else
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
  ifdef JDK_BUILD_NUMBER
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
    ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
  endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
ifeq ($(VARIANT), DBG)
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
  ANT_OPTIONS += -Djavac.debug=true
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
else
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
  ifeq ($(VARIANT), OPT)
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
    ANT_OPTIONS += -Djavac.debug=false
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
  endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
2830
2c7571fb9056 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2204
diff changeset
    72
ifeq ($(DEBUG_CLASSFILES), true)
2c7571fb9056 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2204
diff changeset
    73
  ANT_OPTIONS += -Djavac.debug=true
2c7571fb9056 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2204
diff changeset
    74
endif
2c7571fb9056 6829575: 100028: Debug information is incomplete or missing
aph
parents: 2204
diff changeset
    75
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
# and the somewhat misnamed CLASS_VERSION (-target NN)
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
ifdef TARGET_CLASS_VERSION
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
  ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
else
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
  ifdef JAVAC_TARGET_ARG
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
    ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
  endif
2966
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    84
endif 
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    85
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    86
ifdef SOURCE_LANGUAGE_VERSION
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    87
  ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    88
else
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    89
  ifdef JAVAC_SOURCE_ARG 
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    90
    ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    91
  endif
b6cb15e139ac 6827026: Change javac source and target default to 7
jjg
parents: 2204
diff changeset
    92
endif 
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
ifdef ALT_BOOTDIR
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
  ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
ifdef ALT_OUTPUTDIR
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
  OUTPUTDIR = $(ALT_OUTPUTDIR)
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
  ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
  ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
else
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
  OUTPUTDIR = ..
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
ifdef ALT_LANGTOOLS_DIST
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
  ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
ifdef FINDBUGS_HOME
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
  ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
ifdef ANT_HOME
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
  ANT = $(ANT_HOME)/bin/ant
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
  ifneq ($(shell test -x $(ANT); echo $$?), 0)
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
    $(error "$(ANT) not found; please update ANT_HOME")
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
  endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
else
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
  ANT = ant
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
  ifneq ($(shell which $(ANT) > /dev/null; echo $$?), 0)
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
    $(error "\"ant\" not found; please set ANT_HOME or put \"ant\" on your PATH")
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
  endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
endif
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
# Default target and expected 'do everything' target
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
all: build
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
# Standard make clobber target
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
clobber: clean
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
# All ant targets of interest
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
ANT_TARGETS = build clean sanity # for now
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
# Create a make target for each
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
$(ANT_TARGETS):
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
	$(ANT_JAVA_HOME) $(ANT) -version
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
	$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
# Targets for Sun's internal JPRT build system
153
510a9a867e27 6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents: 6
diff changeset
   141
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
153
510a9a867e27 6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents: 6
diff changeset
   143
	$(RM) $(JPRT_ARCHIVE_BUNDLE)
510a9a867e27 6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents: 6
diff changeset
   144
	( cd $(OUTPUTDIR)/dist && \
510a9a867e27 6652588: Fix broken JPRT makefile target, no bundle saved
ohair
parents: 6
diff changeset
   145
	  zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
# Declare these phony (not filenames)
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
.PHONY: $(ANT_TARGETS) all clobber \
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
	jprt_build_product jprt_build_debug jprt_build_fastdebug