annotate make/Makefile @ 56:d95fec0fa489

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