nashorn/make/Makefile
author sundar
Mon, 11 Feb 2013 21:26:06 +0530
changeset 16226 0e4f37e6cc40
parent 16208 0d15274b2326
child 16247 a79eb9df5b0d
permissions -rw-r--r--
8007915: Nashorn IR, codegen, parser packages and Context instance should be inaccessible to user code Reviewed-by: lagergren, jlaskey, attila
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     1
#
16151
97c1e756ae1e 8005663: Update copyright year to 2013
jlaskey
parents: 16147
diff changeset
     2
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     4
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    15
# accompanied this code).
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    16
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    20
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    23
# questions.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    24
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    25
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    26
# Makefile for nashorn: wrapper around Ant build.xml file
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    27
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    28
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    29
# On Solaris, the standard 'make' utility will not work with these makefiles.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    30
#    This little rule is only understood by Solaris make, and is harmless
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    31
#    when seen by the GNU make tool. If using Solaris make, this causes the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    32
#    make command to fail.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    33
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    34
SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    35
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    36
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    37
# Minimal platform defs
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    38
# Need FullPath because we can't rely on gnumake abspath, until we use v3.81
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    39
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    40
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    41
SYSTEM_UNAME := $(shell uname)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    42
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    43
# Where is unwanted output to be delivered?
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    44
# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    45
ifeq ($(SYSTEM_UNAME), Windows_NT)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    46
DEV_NULL = NUL
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    47
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    48
DEV_NULL = /dev/null 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    49
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    50
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    51
ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    52
USING_CYGWIN = true
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    53
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    54
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    55
ifdef USING_CYGWIN
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    56
define FullPath
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    57
$(shell cygpath -a -s -m $1 2> $(DEV_NULL))
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    58
endef
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    59
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    60
define FullPath
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    61
$(shell cd $1 2> $(DEV_NULL) && pwd)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    62
endef
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    63
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    64
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    65
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    66
# Makefile args
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    67
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    68
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    69
ifdef QUIET
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    70
  ANT_OPTIONS += -quiet
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    71
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    72
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    73
ifdef VERBOSE
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    74
  ANT_OPTIONS += -verbose -debug
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    75
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    76
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    77
ifdef JDK_VERSION
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    78
  ANT_OPTIONS += -Djdk.version=$(JDK_VERSION)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    79
endif 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    80
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    81
ifdef FULL_VERSION
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    82
  ANT_OPTIONS += -Dfull.version='$(FULL_VERSION)' # will contain spaces
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    83
endif 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    84
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    85
ifdef MILESTONE
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    86
ifneq ($(MILESTONE),fcs)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    87
  ANT_OPTIONS += -Dmilestone=$(MILESTONE)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    88
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    89
  ANT_OPTIONS += -Drelease=$(JDK_VERSION)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    90
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    91
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    92
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    93
ifdef BUILD_NUMBER
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    94
  ANT_OPTIONS += -Dbuild.number=$(BUILD_NUMBER)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    95
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    96
  ifdef JDK_BUILD_NUMBER
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    97
    ANT_OPTIONS += -Dbuild.number=$(JDK_BUILD_NUMBER)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    98
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    99
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   100
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   101
ifeq ($(VARIANT), DBG)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   102
  ANT_OPTIONS += -Djavac.debug=true
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   103
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   104
  ifeq ($(VARIANT), OPT)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   105
    ANT_OPTIONS += -Djavac.debug=false
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   106
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   107
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   108
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   109
ifeq ($(DEBUG_CLASSFILES), true)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   110
  ANT_OPTIONS += -Djavac.debug=true
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   111
  ANT_OPTIONS += -Ddebug.classfiles=true
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   112
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   113
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   114
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   115
# and the somewhat misnamed CLASS_VERSION (-target NN)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   116
ifdef TARGET_CLASS_VERSION
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   117
  ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   118
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   119
  ifdef JAVAC_TARGET_ARG 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   120
    ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   121
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   122
endif 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   123
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   124
ifdef SOURCE_LANGUAGE_VERSION
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   125
  ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   126
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   127
  ifdef JAVAC_SOURCE_ARG 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   128
    ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   129
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   130
endif 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   131
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   132
ifdef ALT_BOOTDIR
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   133
  ANT_OPTIONS += -Dboot.java.home=$(ALT_BOOTDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   134
  ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   135
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   136
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   137
# To facilitate bootstrapping, much of langtools can be compiled with (just)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   138
# a boot JDK. However, some source files need to be compiled against 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   139
# new JDK API. In a bootstrap build, an import JDK may not be available,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   140
# so build.xml can also build against the source files in a jdk repo,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   141
# in which case it will automatically generate stub files for the new JDK API.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   142
ifdef JDK_TOPDIR
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   143
  ANT_OPTIONS += -Dimport.jdk=$(JDK_TOPDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   144
else 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   145
  ifdef ALT_JDK_TOPDIR
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   146
    ANT_OPTIONS += -Dimport.jdk=$(ALT_JDK_TOPDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   147
  else 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   148
    ifdef ALT_JDK_IMPORT_PATH
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   149
      ANT_OPTIONS += -Dimport.jdk=$(ALT_JDK_IMPORT_PATH)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   150
    endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   151
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   152
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   153
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   154
ifdef ALT_OUTPUTDIR
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   155
  OUTPUTDIR = $(ALT_OUTPUTDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   156
  ANT_OPTIONS += -Dbuild.dir=$(ALT_OUTPUTDIR)/build
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   157
  ANT_OPTIONS += -Ddist.dir=$(ALT_OUTPUTDIR)/dist
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   158
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   159
  OUTPUTDIR = ..
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   160
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   161
#ABS_OUTPUTDIR = $(abspath $(OUTPUTDIR))
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   162
ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   163
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   164
ANT_TMPDIR = $(ABS_OUTPUTDIR)/build/ant-tmp
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   165
ANT_OPTS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)'
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   166
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   167
ifdef FINDBUGS_HOME
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   168
  ANT_OPTIONS += -Dfindbugs.home=$(FINDBUGS_HOME)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   169
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   170
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   171
ifdef ANT_HOME
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   172
  ANT = $(ANT_HOME)/bin/ant
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   173
  ifneq ($(shell test -x $(ANT) && echo OK), OK)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   174
    $(error $(ANT) not found -- please update ANT_HOME)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   175
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   176
else
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   177
  ANT = ant
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   178
  ifneq ($(shell test -x "`which $(ANT)`" && echo OK), OK)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   179
    $(error 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   180
  endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   181
endif
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   182
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   183
# Default target and expected 'do everything' target
16226
0e4f37e6cc40 8007915: Nashorn IR, codegen, parser packages and Context instance should be inaccessible to user code
sundar
parents: 16208
diff changeset
   184
all: test
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   185
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   186
# Standard make clobber target
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   187
clobber: clean
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   188
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   189
# All ant targets of interest
16170
9e3f4e0b519b 8006093: Add a makefile target to run all tests (test, test262, perf tests)
sundar
parents: 16163
diff changeset
   190
ANT_TARGETS = clean externals update-externals jar javadoc shelldoc docs test test262 test262parallel octane sunspider perf alltests
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   191
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   192
# Create diagnostics log (careful, ant 1.8.0 -diagnostics always does an exit 1)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   193
$(OUTPUTDIR)/build/ant-diagnostics.log:
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   194
	@mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   195
	@$(RM) $@
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   196
	$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -diagnostics > $@ ; \
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   197
	  $(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) -version >> $@
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   198
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   199
# Create a make target for each
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   200
$(ANT_TARGETS): $(OUTPUTDIR)/build/ant-diagnostics.log
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   201
	@ mkdir -p $(OUTPUTDIR)/build $(ANT_TMPDIR)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   202
	$(ANT_JAVA_HOME) $(ANT_OPTS) $(ANT) $(ANT_OPTIONS) $@
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   203
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   204
#-------------------------------------------------------------------
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   205
#
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   206
# Targets for Oracle's internal JPRT build system
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   207
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   208
CD = cd
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   209
ZIP = zip
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   210
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   211
JPRT_ARCHIVE_BUNDLE=$(ABS_OUTPUTDIR)/$(JPRT_BUILD_FLAVOR)-bundle.zip
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   212
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   213
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   214
	( $(CD) $(OUTPUTDIR) && \
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   215
	  $(ZIP) -q -r $(JPRT_ARCHIVE_BUNDLE) build dist )
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   216
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   217
#-------------------------------------------------------------------
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   218
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   219
# Declare these phony (not filenames)
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   220
.PHONY: $(ANT_TARGETS) all clobber \
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   221
	jprt_build_product jprt_build_debug jprt_build_fastdebug