2012-05-23 08:17:49 +00:00
#-*- tab-width: 4; -*-
2002-03-28 11:24:43 +00:00
# ex:ts=4
#
# bsd.java.mk - Support for Java-based ports.
#
# Created by: Ernst de Haan <znerd@FreeBSD.org>
#
# For FreeBSD committers:
# Please send all suggested changes to the maintainer instead of committing
2013-05-20 00:45:26 +00:00
# them to svn yourself.
2002-03-28 11:24:43 +00:00
#
# $FreeBSD$
#
. i f ! d e f i n e d ( J a v a _ I n c l u d e )
Java_Include = bsd.java.mk
2014-04-11 02:08:05 +00:00
Java_Include_MAINTAINER = java@FreeBSD.org
2002-03-28 11:24:43 +00:00
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
2004-04-05 21:40:04 +00:00
# Variables that each port can define:
#
# USE_JAVA Should be defined to the remaining variables to have any
# effect
#
# JAVA_VERSION List of space-separated suitable java versions for the
# port. An optional "+" allows you to specify a range of
2014-04-10 07:20:23 +00:00
# versions. (allowed values: 1.6[+] 1.7[+] 1.8[+])
2004-04-05 21:40:04 +00:00
#
# JAVA_OS List of space-separated suitable JDK port operating systems
# for the port. (allowed values: native linux)
#
# JAVA_VENDOR List of space-separated suitable JDK port vendors for the
2014-04-11 17:17:33 +00:00
# port. (allowed values: openjdk oracle sun)
2004-04-05 21:40:04 +00:00
#
# JAVA_BUILD When set, it means that the selected JDK port should be
# added to build dependencies for the port.
#
2014-05-02 21:35:14 +00:00
# JAVA_EXTRACT This variable works exactly the same as JAVA_BUILD but
# regarding extract dependencies.
#
2004-04-05 21:40:04 +00:00
# JAVA_RUN This variable works exactly the same as JAVA_BUILD but
# regarding run dependencies.
#
2004-08-02 21:44:17 +00:00
# USE_ANT Should be defined when the port uses Apache Ant. Ant is thus
# considered to be the sub-make command. When no 'do-build'
# target is defined by the port, a default one will be set
# that simply runs Ant according to MAKE_ENV, MAKE_ARGS and
2005-02-25 13:29:52 +00:00
# ALL_TARGET. Read the documentation in bsd.port.mk for more
2004-08-02 21:44:17 +00:00
# information.
#
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
2004-04-05 21:40:04 +00:00
# Variables defined for the port:
#
2014-04-11 17:17:33 +00:00
# JAVA_PORT The name of the JDK port. (e.g. 'java/openjdk6')
2004-04-05 21:40:04 +00:00
#
2011-06-28 18:46:46 +00:00
# JAVA_PORT_VERSION The version of the JDK port. (e.g. '1.6')
2004-04-05 21:40:04 +00:00
#
# JAVA_PORT_OS The operating system used by the JDK port. (e.g. 'linux')
#
# JAVA_PORT_VENDOR The vendor of the JDK port. (e.g. 'sun')
#
# JAVA_PORT_OS_DESCRIPTION Description of the operating system used by the
# JDK port. (e.g. 'Linux')
#
# JAVA_PORT_VENDOR_DESCRIPTION Description of the vendor of the JDK port.
2014-04-11 17:17:33 +00:00
# (e.g. 'OpenJDK BSD Porting Team')
2004-04-05 21:40:04 +00:00
#
# JAVA_HOME Path to the installation directory of the JDK. (e.g.
2014-04-11 15:37:52 +00:00
# '/usr/local/openjdk6')
2004-04-05 21:40:04 +00:00
#
# JAVAC Path to the Java compiler to use. (e.g.
2014-04-11 15:37:52 +00:00
# '/usr/local/openjdk6/bin/javac' or '/usr/local/bin/javac')
2004-04-05 21:40:04 +00:00
#
# JAR Path to the JAR tool to use. (e.g.
2014-04-11 15:37:52 +00:00
# '/usr/local/openjdk6/bin/jar' or '/usr/local/bin/fastjar')
2004-04-05 21:40:04 +00:00
#
# APPLETVIEWER Path to the appletviewer utility. (e.g.
2014-04-11 17:17:33 +00:00
# '/usr/local/linux-jdk1.7.0/bin/appletviewer')
2004-04-05 21:40:04 +00:00
#
# JAVA Path to the java executable. Use this for executing Java
2014-04-11 15:37:52 +00:00
# programs. (e.g. '/usr/local/openjdk6/bin/java')
2004-04-05 21:40:04 +00:00
#
# JAVADOC Path to the javadoc utility program.
#
# JAVAH Path to the javah program.
#
# JAVAP Path to the javap program.
#
2007-10-28 15:09:43 +00:00
# JAVA_KEYTOOL Path to the keytool utility program.
2004-04-05 21:40:04 +00:00
#
# JAVA_N2A Path to the native2ascii tool.
#
2007-10-28 15:09:43 +00:00
# JAVA_POLICYTOOL Path to the policytool program.
2004-04-05 21:40:04 +00:00
#
# JAVA_SERIALVER Path to the serialver utility program.
#
# RMIC Path to the RMI stub/skeleton generator, rmic.
#
# RMIREGISTRY Path to the RMI registry program, rmiregistry.
#
2007-10-28 15:09:43 +00:00
# RMID Path to the RMI daemon program.
2004-04-05 21:40:04 +00:00
#
# JAVA_CLASSES Path to the archive that contains the JDK class files. On
2007-10-28 15:09:43 +00:00
# most JDKs, this is ${JAVA_HOME}/jre/lib/rt.jar.
2004-04-05 21:40:04 +00:00
#
2006-10-07 20:40:07 +00:00
# JAVASHAREDIR The base directory for all shared Java resources.
2004-09-02 05:02:58 +00:00
#
2006-10-07 20:40:07 +00:00
# JAVAJARDIR The directory where a port should install JAR files.
2004-09-02 05:02:58 +00:00
#
2006-10-07 20:40:07 +00:00
# JAVALIBDIR The directory where JAR files installed by other ports
# are located.
2004-09-02 05:02:58 +00:00
#
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
# Porter's hints
#
2011-09-04 19:23:26 +00:00
# To retrieve the Major version number from JAVA_PORT_VERSION (e.g. "1.6"):
2004-04-16 14:53:22 +00:00
# -> ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}
2002-04-04 23:01:24 +00:00
#
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
2002-04-04 23:01:24 +00:00
# There are the following stages:
#
# Stage 1: Define constants
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 2: Determine which JDK ports are installed and which JDK ports are
2006-10-07 20:40:07 +00:00
# suitable
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 3: Decide the exact JDK to use (or install)
# Stage 4: Add any dependencies if necessary
# Stage 5: Define all settings for the port to use
2002-04-04 23:01:24 +00:00
#
2002-03-28 11:24:43 +00:00
. i f d e f i n e d ( U S E _ J A V A )
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
2002-03-28 11:24:43 +00:00
# Stage 1: Define constants
#
2002-11-18 13:00:00 +00:00
# System-global directories
2004-09-03 16:25:11 +00:00
# NB: If the value of JAVALIBDIR is altered here it must also be altered
2006-10-07 20:40:07 +00:00
# in java/javavmwrapper/Makefile.
2002-11-18 13:00:00 +00:00
JAVASHAREDIR ?= ${ PREFIX } /share/java
JAVAJARDIR ?= ${ JAVASHAREDIR } /classes
2004-09-02 05:02:58 +00:00
JAVALIBDIR ?= ${ LOCALBASE } /share/java/classes
2002-11-18 13:00:00 +00:00
2004-12-19 02:26:53 +00:00
# Add appropriate substitutions to PLIST_SUB and LIST_SUB
2004-06-29 20:16:37 +00:00
PLIST_SUB += JAVASHAREDIR = " ${ JAVASHAREDIR : S ,^ ${ PREFIX } /,, } " \
2004-12-19 02:26:53 +00:00
JAVAJARDIR = " ${ JAVAJARDIR : S ,^ ${ PREFIX } /,, } "
SUB_LIST += JAVASHAREDIR = " ${ JAVASHAREDIR } " \
JAVAJARDIR = " ${ JAVAJARDIR } " \
JAVALIBDIR = " ${ JAVALIBDIR } "
2005-02-27 23:49:33 +00:00
. i f d e f i n e d ( J A V A _ V E R S I O N )
SUB_LIST += JAVA_VERSION = " ${ JAVA_VERSION } "
. e n d i f
. i f d e f i n e d ( J A V A _ V E N D O R )
SUB_LIST += JAVA_VENDOR = " ${ JAVA_VENDOR } "
. e n d i f
. i f d e f i n e d ( J A V A _ O S )
SUB_LIST += JAVA_OS = " ${ JAVA_OS } "
. e n d i f
2004-06-29 20:16:37 +00:00
2004-04-03 03:37:05 +00:00
# The complete list of Java versions, os and vendors supported.
2014-04-10 07:20:23 +00:00
__JAVA_VERSION_LIST = 1.6 1.7 1.8
2011-07-21 05:03:02 +00:00
_JAVA_VERSION_LIST = ${ __JAVA_VERSION_LIST } ${ __JAVA_VERSION_LIST : S / $/+/ }
2004-04-16 14:53:22 +00:00
_JAVA_OS_LIST = native linux
2014-04-11 15:37:52 +00:00
_JAVA_VENDOR_LIST = openjdk oracle sun
2004-04-03 03:37:05 +00:00
# Set all meta-information about JDK ports:
# port location, corresponding JAVA_HOME, JDK version, OS, vendor
2009-05-22 04:11:20 +00:00
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_6_INFO = PORT = java/openjdk6 HOME = ${ LOCALBASE } /openjdk6 \
VERSION = 1.6.0 OS = native VENDOR = openjdk
2014-04-24 18:05:21 +00:00
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_7_INFO = PORT = java/openjdk7 HOME = ${ LOCALBASE } /openjdk7 \
VERSION = 1.7.0 OS = native VENDOR = openjdk
_JAVA_PORT_NATIVE_OPENJDK_JDK_1_8_INFO = PORT = java/openjdk8 HOME = ${ LOCALBASE } /openjdk8 \
VERSION = 1.8.0 OS = native VENDOR = openjdk
2014-04-11 15:37:52 +00:00
_JAVA_PORT_LINUX_SUN_JDK_1_7_INFO = PORT = java/linux-sun-jdk17 HOME = ${ LOCALBASE } /linux-sun-jdk1.7.0 \
2012-02-09 06:40:49 +00:00
VERSION = 1.7.0 OS = linux VENDOR = sun
2014-04-24 18:05:21 +00:00
_JAVA_PORT_LINUX_ORACLE_JDK_1_8_INFO = PORT = java/linux-oracle-jdk18 HOME = ${ LOCALBASE } /linux-oracle-jdk1.8.0 \
VERSION = 1.8.0 OS = linux VENDOR = oracle
2004-04-16 14:53:22 +00:00
# Verbose description for each VENDOR
2009-05-22 04:11:20 +00:00
_JAVA_VENDOR_openjdk = "OpenJDK BSD Porting Team"
2014-04-10 07:20:23 +00:00
_JAVA_VENDOR_oracle = Oracle
2014-04-11 15:37:52 +00:00
_JAVA_VENDOR_sun = Sun
2004-04-03 03:37:05 +00:00
2004-04-16 14:53:22 +00:00
# Verbose description for each OS
2004-04-03 03:37:05 +00:00
_JAVA_OS_native = Native
_JAVA_OS_linux = Linux
2002-03-28 11:24:43 +00:00
2014-04-24 18:05:21 +00:00
# List all JDK ports in order of preference
2014-06-27 20:05:36 +00:00
__JAVA_PORTS_ALL = JAVA_PORT_NATIVE_OPENJDK_JDK_1_7 \
2014-04-24 18:05:21 +00:00
JAVA_PORT_NATIVE_OPENJDK_JDK_1_8 \
2014-06-27 20:05:36 +00:00
JAVA_PORT_NATIVE_OPENJDK_JDK_1_6 \
2014-04-24 18:05:21 +00:00
JAVA_PORT_LINUX_SUN_JDK_1_7 \
JAVA_PORT_LINUX_ORACLE_JDK_1_8
2004-04-16 14:53:22 +00:00
_JAVA_PORTS_ALL = ${ JAVA_PREFERRED_PORTS } \
${ __JAVA_PORTS_ALL }
2002-03-28 11:24:43 +00:00
# Set the name of the file that indicates that a JDK is indeed installed, as a
# relative path within the JAVA_HOME directory.
2002-04-04 23:01:24 +00:00
_JDK_FILE = bin/javac
2002-03-28 11:24:43 +00:00
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 2: Determine which JDK ports are suitable and which JDK ports are
2004-04-16 14:53:22 +00:00
# suitable
#
# From here, the port is using bsd.java.mk v2.0
2004-11-07 00:51:53 +00:00
# Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS}
. f o r v a r i a b l e i n J A V A _ H O M E J A V A _ P O R T J A V A _ P O R T _ V E R S I O N J A V A _ P O R T _ V E N D O R J A V A _ P O R T _ O S
. i f d e f i n e d ( $ { v a r i a b l e } )
check-makevars ::
2012-04-13 04:03:42 +00:00
@${ ECHO_CMD } " ${ PKGNAME } : Environment error: \" ${ variable } \" should not be defined -- clearing. "
. u n d e f $ { v a r i a b l e }
2004-11-07 00:51:53 +00:00
. e n d i f
. e n d f o r
2004-04-16 14:53:22 +00:00
# Error checking: JAVA_VERSION
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. i f ! d e f i n e d ( _ J A V A _ V E R S I O N _ L I S T _ R E G E X P )
2013-04-26 02:37:19 +00:00
. f o r v i n $ { _ J A V A _ V E R S I O N _ L I S T }
. i f d e f i n e d ( _ J A V A _ V E R S I O N _ L I S T _ R E G E X P )
_JAVA_VERSION_LIST_REGEXP := ${ _JAVA_VERSION_LIST_REGEXP } \|
. e n d i f
_JAVA_VERSION_LIST_REGEXP := ${ _JAVA_VERSION_LIST_REGEXP } $v
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. e n d i f
2013-04-26 02:37:19 +00:00
2004-07-01 22:44:00 +00:00
check-makevars ::
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
@test ! -z " ${ JAVA_VERSION } " && ( ${ ECHO_CMD } " ${ JAVA_VERSION } " | ${ TR } " " "\n" | ${ GREP } -q " ${ _JAVA_VERSION_LIST_REGEXP } " || \
( ${ ECHO_CMD } " ${ PKGNAME } : Makefile error: \" ${ JAVA_VERSION } \" is not a valid value for JAVA_VERSION. It should be one or more of: ${ __JAVA_VERSION_LIST } (with an optional \"+\" suffix.) " ; ${ FALSE } ) ) || true
2004-04-03 03:37:05 +00:00
2004-04-16 14:53:22 +00:00
# Error checking: JAVA_VENDOR
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. i f ! d e f i n e d ( _ J A V A _ V E N D O R _ L I S T _ R E G E X P )
2013-04-26 02:37:19 +00:00
. f o r v i n $ { _ J A V A _ V E N D O R _ L I S T }
. i f d e f i n e d ( _ J A V A _ V E N D O R _ L I S T _ R E G E X P )
_JAVA_VENDOR_LIST_REGEXP := ${ _JAVA_VENDOR_LIST_REGEXP } \|
. e n d i f
_JAVA_VENDOR_LIST_REGEXP := ${ _JAVA_VENDOR_LIST_REGEXP } $v
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. e n d i f
2004-07-01 22:44:00 +00:00
check-makevars ::
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
@test ! -z " ${ JAVA_VENDOR } " && ( ${ ECHO_CMD } " ${ JAVA_VENDOR } " | ${ TR } " " "\n" | ${ GREP } -q " ${ _JAVA_VENDOR_LIST_REGEXP } " || \
( ${ ECHO_CMD } " ${ PKGNAME } : Makefile error: \" ${ JAVA_VENDOR } \" is not a valid value for JAVA_VENDOR. It should be one or more of: ${ _JAVA_VENDOR_LIST } " ; \
${ FALSE } ) ) || true
2002-03-28 11:24:43 +00:00
2004-04-16 14:53:22 +00:00
# Error checking: JAVA_OS
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. i f ! d e f i n e d ( _ J A V A _ O S _ L I S T _ R E G E X P )
2013-04-26 02:37:19 +00:00
. f o r v i n $ { _ J A V A _ O S _ L I S T }
. i f d e f i n e d ( _ J A V A _ O S _ L I S T _ R E G E X P )
_JAVA_OS_LIST_REGEXP := ${ _JAVA_OS_LIST_REGEXP } \|
. e n d i f
_JAVA_OS_LIST_REGEXP := ${ _JAVA_OS_LIST_REGEXP } $v
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. e n d i f
2004-07-01 22:44:00 +00:00
check-makevars ::
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
@test ! -z " ${ JAVA_OS } " && ( ${ ECHO_CMD } " ${ JAVA_OS } " | ${ TR } " " "\n" | ${ GREP } -q " ${ _JAVA_OS_LIST_REGEXP } " || \
( ${ ECHO_CMD } " ${ PKGNAME } : Makefile error: \" ${ JAVA_OS } \" is not a valid value for JAVA_OS. It should be one or more of: ${ _JAVA_OS_LIST } " ; \
${ FALSE } ) ) || true
2004-04-03 03:37:05 +00:00
2004-11-29 17:33:41 +00:00
# Set default values for JAVA_BUILD and JAVA_RUN
# When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre
# (unless NO_BUILD is set)
. i f ! d e f i n e d ( J A V A _ E X T R A C T ) & & ! d e f i n e d ( J A V A _ B U I L D ) & & ! d e f i n e d ( J A V A _ R U N )
. i f ! d e f i n e d ( N O _ B U I L D )
JAVA_BUILD = jdk
. e n d i f
JAVA_RUN = jre
. e n d i f
2004-04-16 14:53:22 +00:00
# JDK dependency setting
. u n d e f _ J A V A _ P O R T S _ I N S T A L L E D
. u n d e f _ J A V A _ P O R T S _ P O S S I B L E
. i f d e f i n e d ( J A V A _ V E R S I O N )
2014-04-10 07:20:23 +00:00
_JAVA_VERSION = ${ JAVA_VERSION : S /1.6+/1.6 1.7+/ : S /1.7+/1.7 1.8+/ : S /1.8+/1.8/ }
2004-04-16 14:53:22 +00:00
. e l s e
_JAVA_VERSION = ${ __JAVA_VERSION_LIST }
. e n d i f
. i f d e f i n e d ( J A V A _ O S )
_JAVA_OS = ${ JAVA_OS }
. e l s e
_JAVA_OS = ${ _JAVA_OS_LIST }
. e n d i f
. i f d e f i n e d ( J A V A _ V E N D O R )
_JAVA_VENDOR = ${ JAVA_VENDOR }
. e l s e
_JAVA_VENDOR = ${ _JAVA_VENDOR_LIST }
. e n d i f
2004-04-03 03:37:05 +00:00
2004-04-16 14:53:22 +00:00
. f o r A _ J A V A _ P O R T i n $ { _ J A V A _ P O R T S _ A L L }
A_JAVA_PORT_INFO := ${ A_JAVA_PORT : S /^/ \$ {_/ : S / $/_INFO } /}
A_JAVA_PORT_HOME = ${ A_JAVA_PORT_INFO : MHOME =* : S ,HOME=,, }
A_JAVA_PORT_VERSION = ${ A_JAVA_PORT_INFO : MVERSION =* : C /VERSION=([0-9]) \. ([0-9])(.*)/ \1 . \2 / }
A_JAVA_PORT_OS = ${ A_JAVA_PORT_INFO : MOS =* : S ,OS=,, }
A_JAVA_PORT_VENDOR = ${ A_JAVA_PORT_INFO : MVENDOR =* : S ,VENDOR=,, }
2013-04-26 02:37:19 +00:00
. i f ! d e f i n e d ( _ J A V A _ P O R T S _ I N S T A L L E D ) & & e x i s t s ( $ { A _ J A V A _ P O R T _ H O M E } / $ { _ J D K _ F I L E } )
__JAVA_PORTS_INSTALLED += ${ A_JAVA_PORT }
. e n d i f
2013-04-26 02:38:41 +00:00
# Because variables inside for loops are special (directly replaced as strings),
# we are allowed to use them inside modifiers, where normally ${FOO:M${BAR}} is
# not allowed.
2013-04-26 02:37:19 +00:00
#
. f o r v e r i n $ { A _ J A V A _ P O R T _ V E R S I O N }
. f o r o s i n $ { A _ J A V A _ P O R T _ O S }
. f o r v e n d o r i n $ { A _ J A V A _ P O R T _ V E N D O R }
.if ${_JAVA_VERSION : M ${ver }} && ${_JAVA_OS :M ${os }} && ${_JAVA_VENDOR :M ${vendor }}
__JAVA_PORTS_POSSIBLE += ${ A_JAVA_PORT }
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. e n d i f
2013-04-26 02:37:19 +00:00
. e n d f o r
. e n d f o r
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
2004-04-16 14:53:22 +00:00
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. i f ! d e f i n e d ( _ J A V A _ P O R T S _ I N S T A L L E D )
2004-04-16 14:53:22 +00:00
_JAVA_PORTS_INSTALLED = ${ __JAVA_PORTS_INSTALLED : C / [ ]+/ /g }
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. e n d i f
2004-04-16 14:53:22 +00:00
_JAVA_PORTS_POSSIBLE = ${ __JAVA_PORTS_POSSIBLE : C / [ ]+/ /g }
#-------------------------------------------------------------------------------
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 3: Decide the exact JDK to use (or install)
2004-04-03 03:37:05 +00:00
#
# Find an installed JDK port that matches the requirements of the port
2004-04-16 14:53:22 +00:00
. u n d e f _ J A V A _ P O R T S _ I N S T A L L E D _ P O S S I B L E
. f o r A _ J A V A _ P O R T i n $ { _ J A V A _ P O R T S _ P O S S I B L E }
2013-04-26 02:37:19 +00:00
__JAVA_PORTS_INSTALLED_POSSIBLE += ${ _JAVA_PORTS_INSTALLED : M ${ A_JAVA_PORT } }
2004-04-16 14:53:22 +00:00
. e n d f o r
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
_JAVA_PORTS_INSTALLED_POSSIBLE = ${ __JAVA_PORTS_INSTALLED_POSSIBLE : C /[ ]+//g }
2004-04-16 14:53:22 +00:00
2004-04-03 03:37:05 +00:00
. i f ${_JAVA_PORTS_INSTALLED_POSSIBLE} != ""
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. f o r i i n $ { _ J A V A _ P O R T S _ I N S T A L L E D _ P O S S I B L E }
. i f ! d e f i n e d ( _ J A V A _ P O R T S _ I N S T A L L E D _ P O S S I B L E _ s h o r t c i r c u i t )
_JAVA_PORT = $i
_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit = 1
. e n d i f
. e n d f o r
2004-04-03 03:37:05 +00:00
# If no installed JDK port fits, then pick one from the list of possible ones
. e l s e
Major optimizations for 'make index' and other recursive traversal
targets.
* Use /rescue/sh for index builds instead of /bin/sh, when it exists.
The former is statically linked and faster to execute, which becomes
significant when executing it tens of thousands of times. This
trick can be used with other recursive targets by passing in
__MAKE_SHELL.
* Get rid of make variable assignments that use != command invocations
in the critical path, using several methods:
- rewriting logic to use shell or make builtins instead of external command executions
- macroizing commands and executing them in the targets where they
are needed instead of with every invocation of make
- precomputing the results of invariant commands in
bsd.port.subdir.mk and passing them in explicitly to child makes,
and using this to avoid recalculation in all the children. NB: the
commands are still run one per top-level subdirectory but this
does not currently seem to be a major issue. They could be moved
further up into the top-level Makefile at the cost of some
cleanliness.
- Committers are strongly discouraged from adding further "bare" !=
assignments to the ports tree, even in their own ports. One of
the above strategies should be used to avoid future bloat.
* Rewrite the core 'describe' target to work entirely within a single
shell process using only builtin commands. The old version is
retained as a backup for use on systems older than 603104, which
does not have the make :u modifier. This cuts down the number of
processes executed during the course of a 'make index' by an order
of magnitude, and we are essentially now amortized to the minimum of
a single make + sh instance per port, plus whatever commands the
port makefile itself executes (which are usually unnecessary and
bogus).
* Less validation of the WWW: target is performed; this can become
policed at a port level by portlint. Specifically we look at the
second word of the first line beginning with "WWW:" in pkg-descr,
and append "http://" to it unless it already begins with "http://",
"https://" or "ftp://". Thanks to dougb for the idea of how to
extract WWW: using shell builtins.
* Use the "true" shell builtin instead of echo > /dev/null for a
measurable decrease in CPU use.
* Add a note about dubious escaping strategy in bsd.port.subdir.mk
* Minor change in output of 'make describe': it no longer strips
trailing CR characters from pkg-descr files with MSDOS CR/LF
termination. Instead the makeindex perl script that post-processes
make describe into the INDEX is tweaked to strip on input.
The bottom line is that on my test hardware INDEX builds are now
faster by more than a factor of 2 and with a reduction in system time
by a factor of 4-8 depending on configuration.
2008-07-19 17:59:41 +00:00
. f o r i i n $ { _ J A V A _ P O R T S _ P O S S I B L E }
. i f ! d e f i n e d ( _ J A V A _ P O R T S _ P O S S I B L E _ s h o r t c i r c u i t )
_JAVA_PORT = $i
_JAVA_PORTS_POSSIBLE_shortcircuit = 1
. e n d i f
. e n d f o r
2004-04-03 03:37:05 +00:00
. e n d i f
2004-04-16 14:53:22 +00:00
_JAVA_PORT_INFO := ${ _JAVA_PORT : S /^/ \$ {_/ : S / $/_INFO } /}
JAVA_PORT = ${ _JAVA_PORT_INFO : MPORT =* : S ,PORT=,, }
JAVA_HOME = ${ _JAVA_PORT_INFO : MHOME =* : S ,HOME=,, }
JAVA_PORT_VERSION = ${ _JAVA_PORT_INFO : MVERSION =* : S ,VERSION=,, }
JAVA_PORT_OS = ${ _JAVA_PORT_INFO : MOS =* : S ,OS=,, }
JAVA_PORT_VENDOR = ${ _JAVA_PORT_INFO : MVENDOR =* : S ,VENDOR=,, }
2004-04-03 03:37:05 +00:00
JAVA_PORT_VENDOR_DESCRIPTION := ${ JAVA_PORT_VENDOR : S /^/ \$ {_JAVA_VENDOR_/ : S / $/ } /}
JAVA_PORT_OS_DESCRIPTION := ${ JAVA_PORT_OS : S /^/ \$ {_JAVA_OS_/ : S / $/ } /}
2004-06-09 18:17:24 +00:00
#-------------------------------------------------------------------------------
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 4: Add any dependencies if necessary
2004-06-09 18:17:24 +00:00
#
2004-08-02 21:44:17 +00:00
# Ant Support: USE_ANT --> JAVA_BUILD=jdk
. i f d e f i n e d ( U S E _ A N T )
JAVA_BUILD = jdk
. e n d i f
2004-06-09 18:17:24 +00:00
# Add the JDK port to the dependencies
DEPEND_JAVA = ${ JAVA } :${ PORTSDIR } /${ JAVA_PORT }
. i f d e f i n e d ( J A V A _ E X T R A C T )
EXTRACT_DEPENDS += ${ DEPEND_JAVA }
2004-07-27 05:16:34 +00:00
. e n d i f
2004-06-09 18:17:24 +00:00
. i f d e f i n e d ( J A V A _ B U I L D )
. i f d e f i n e d ( N O _ B U I L D )
2004-07-01 22:44:00 +00:00
check-makevars ::
@${ ECHO_CMD } " ${ PKGNAME } : Makefile error: JAVA_BUILD and NO_BUILD cannot be set at the same time. " ;
2004-06-09 18:17:24 +00:00
@${ FALSE }
. e n d i f
2004-07-27 05:16:34 +00:00
BUILD_DEPENDS += ${ DEPEND_JAVA }
. e n d i f
2004-06-09 18:17:24 +00:00
. i f d e f i n e d ( J A V A _ R U N )
RUN_DEPENDS += ${ DEPEND_JAVA }
. e n d i f
2004-08-02 21:44:17 +00:00
# Ant support: default do-build target
. i f d e f i n e d ( U S E _ A N T )
2013-11-12 10:36:16 +00:00
DESTDIRNAME ?= -Dfreebsd.ports.destdir
2004-08-02 21:44:17 +00:00
ANT ?= ${ LOCALBASE } /bin/ant
MAKE_ENV += JAVA_HOME = ${ JAVA_HOME }
BUILD_DEPENDS += ${ ANT } :${ PORTSDIR } /devel/apache-ant
ALL_TARGET ?=
. i f ! t a r g e t ( d o - b u i l d )
do-build :
@( cd ${ BUILD_WRKSRC } ; \
${ SETENV } ${ MAKE_ENV } ${ ANT } ${ MAKE_ARGS } ${ ALL_TARGET } )
. e n d i f
. e n d i f
2004-06-09 18:17:24 +00:00
2002-03-28 11:24:43 +00:00
#-----------------------------------------------------------------------------
bsd.port.mk
[1] Remove DEPENDS
[2] Add a new pkg-plist keyword @stopdaemon
[3] Provide rc.subr script suffix as RC_SUBR_SUFFIX
[4] Add USE_CDRTOOLS to abstract dependency on sysutils/cdrtool[-cjk]
[5] Add DOS2UNIX_REGEX, allowing to pass a filename regex to CRLF replacement
routine
[6] Support partially translated manpages in MAN* variables
[7] Fix USE_LDCONFIG on ports with @cwd in pkg-plist
[8] Remove support for XFree86 3.X
[9] Add user settable WITH_DEBUG flag that turns on -g in CFLAGS and resets
STRIP
[9] Fix `make install' to refuse overwriting of older version of the port
[10] New category ports-mgmt
[11] New category gnustep
[12] Removed category picobsd
bsd.java.mk
[13] Remove deprecated syntax
bsd.tcl.mk
[14] Provide TCL_VER when USE_TK[_BUILD] is defined. Fixes cad/netgen
ports/Makefile
[15] Make csup default `make update' method on FreeBSD 6.2 and up
PR: ports/99742 [1], ports/93373 [2], ports/100915 [3],
ports/105161 [4], ports/106029 [5], ports/106252 [6],
ports/106235 [7], ports/100939 [9], ports/97507 [10],
ports/103931 [11], ports/106921 [12], ports/104136 [13],
ports/105215 [15]
Submitted by: sem [1] [2], Matthias Andree <matthias.andree@gmx.de> [3],
nork [4], pav [5] [7] [14], Nick Barkas <snb@threerings.net> [6],
flz [8], gabor [9], shaun [10], erwin [12], hq [13],
Gurkan Sengun <gurkan@linuks.mine.nu> [11]
2007-01-31 14:07:24 +00:00
# Stage 5: Define all settings for the port to use
2004-04-16 14:53:22 +00:00
#
2002-04-26 22:30:47 +00:00
# At this stage both JAVA_HOME and JAVA_PORT are definitely given a value.
2004-04-16 14:53:22 +00:00
#
2011-07-21 05:03:02 +00:00
# Define the location of the Java compiler.
2002-04-26 22:30:47 +00:00
2011-07-21 05:03:02 +00:00
# Only define JAVAC if a JDK is needed
2002-03-28 11:24:43 +00:00
. u n d e f J A V A C
2002-04-26 22:30:47 +00:00
2004-04-16 14:53:22 +00:00
# Then test if a JAVAC has to be set (JAVA_BUILD==jdk)
. i f d e f i n e d ( J A V A _ B U I L D )
2014-05-05 09:45:36 +00:00
. if (${JAVA_BUILD : tu } == "JDK ") && !defined (JAVAC )
2004-06-29 20:16:37 +00:00
JAVAC ?= ${ JAVA_HOME } /bin/javac
2002-04-26 22:30:47 +00:00
. e n d i f
2002-03-28 11:24:43 +00:00
. e n d i f
# Define the location of some more executables.
2004-06-29 20:16:37 +00:00
APPLETVIEWER ?= ${ JAVA_HOME } /bin/appletviewer
JAR ?= ${ JAVA_HOME } /bin/jar
JAVA ?= ${ JAVA_HOME } /bin/java
JAVADOC ?= ${ JAVA_HOME } /bin/javadoc
JAVAH ?= ${ JAVA_HOME } /bin/javah
JAVAP ?= ${ JAVA_HOME } /bin/javap
JAVA_N2A ?= ${ JAVA_HOME } /bin/native2ascii
JAVA_SERIALVER ?= ${ JAVA_HOME } /bin/serialver
RMIC ?= ${ JAVA_HOME } /bin/rmic
RMIREGISTRY ?= ${ JAVA_HOME } /bin/rmiregistry
JAVA_KEYTOOL ?= ${ JAVA_HOME } /bin/keytool
JAVA_POLICYTOOL ?= ${ JAVA_HOME } /bin/policytool
RMID ?= ${ JAVA_HOME } /bin/rmid
2002-03-28 11:24:43 +00:00
# Set the location of the ZIP or JAR file with all standard Java classes.
JAVA_CLASSES = ${ JAVA_HOME } /jre/lib/rt.jar
2002-04-04 23:01:24 +00:00
2004-04-16 14:53:22 +00:00
#-------------------------------------------------------------------------------
# Additional Java support
# Debug target
# Use it to check Java dependency while porting
java-debug :
@${ ECHO_CMD } "# User specified parameters:"
@${ ECHO_CMD } " JAVA_VERSION= ${ JAVA_VERSION } ( ${ _JAVA_VERSION } ) "
@${ ECHO_CMD } " JAVA_OS= ${ JAVA_OS } ( ${ _JAVA_OS } ) "
@${ ECHO_CMD } " JAVA_VENDOR= ${ JAVA_VENDOR } ( ${ _JAVA_VENDOR } ) "
@${ ECHO_CMD } " JAVA_BUILD= ${ JAVA_BUILD } "
@${ ECHO_CMD } " JAVA_RUN= ${ JAVA_RUN } "
@${ ECHO_CMD } " JAVA_EXTRACT= ${ JAVA_EXTRACT } "
@${ ECHO_CMD }
@${ ECHO_CMD } "# JDK port dependency selection process:"
@${ ECHO_CMD } " _JAVA_PORTS_POSSIBLE= ${ _JAVA_PORTS_POSSIBLE } "
@${ ECHO_CMD } " _JAVA_PORTS_INSTALLED= ${ _JAVA_PORTS_INSTALLED } "
@${ ECHO_CMD } " _JAVA_PORTS_INSTALLED_POSSIBLE= ${ _JAVA_PORTS_INSTALLED_POSSIBLE } "
@${ ECHO_CMD } " _JAVA_PORT= ${ _JAVA_PORT } "
@${ ECHO_CMD } " _JAVA_PORT_INFO= ${ _JAVA_PORT_INFO : S / \t / / } "
@${ ECHO_CMD }
@${ ECHO_CMD } "# Selected JDK port:"
@${ ECHO_CMD } " JAVA_PORT= ${ JAVA_PORT } "
@${ ECHO_CMD } " JAVA_HOME= ${ JAVA_HOME } "
@${ ECHO_CMD } " JAVA_PORT_VERSION= ${ JAVA_PORT_VERSION } "
@${ ECHO_CMD } " JAVA_PORT_OS= ${ JAVA_PORT_OS } ( ${ JAVA_PORT_OS_DESCRIPTION } ) "
@${ ECHO_CMD } " JAVA_PORT_VENDOR= ${ JAVA_PORT_VENDOR } ( ${ JAVA_PORT_VENDOR_DESCRIPTION } ) "
@${ ECHO_CMD }
@${ ECHO_CMD } "# Additional variables:"
@${ ECHO_CMD } " JAVAC= ${ JAVAC } "
@${ ECHO_CMD } " JAVA_CLASSES= ${ JAVA_CLASSES } "
2002-03-28 11:24:43 +00:00
. e n d i f
. e n d i f