source-dirs.m4 revision 2402:c37cde0ba52d
1254562Scy#
2254562Scy# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3254562Scy# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4254562Scy#
5254562Scy# This code is free software; you can redistribute it and/or modify it
6254562Scy# under the terms of the GNU General Public License version 2 only, as
7254562Scy# published by the Free Software Foundation.  Oracle designates this
8254562Scy# particular file as subject to the "Classpath" exception as provided
9254562Scy# by Oracle in the LICENSE file that accompanied this code.
10254562Scy#
11254562Scy# This code is distributed in the hope that it will be useful, but WITHOUT
12254562Scy# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13254562Scy# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14254562Scy# version 2 for more details (a copy is included in the LICENSE file that
15254562Scy# accompanied this code).
16254562Scy#
17254562Scy# You should have received a copy of the GNU General Public License version
18254562Scy# 2 along with this work; if not, write to the Free Software Foundation,
19254562Scy# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20254562Scy#
21254562Scy# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22254562Scy# or visit www.oracle.com if you need additional information or have any
23254562Scy# questions.
24254562Scy#
25254562Scy
26254562ScyAC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
27254562Scy[
28254562Scy  # Where are the sources.
29254562Scy  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30254562Scy  CORBA_TOPDIR="$SRC_ROOT/corba"
31254562Scy  JAXP_TOPDIR="$SRC_ROOT/jaxp"
32254562Scy  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
33254562Scy  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
34254562Scy  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
35254562Scy  JDK_TOPDIR="$SRC_ROOT/jdk"
36254562Scy  AC_SUBST(LANGTOOLS_TOPDIR)
37254562Scy  AC_SUBST(CORBA_TOPDIR)
38254562Scy  AC_SUBST(JAXP_TOPDIR)
39254562Scy  AC_SUBST(JAXWS_TOPDIR)
40254562Scy  AC_SUBST(HOTSPOT_TOPDIR)
41254562Scy  AC_SUBST(NASHORN_TOPDIR)
42254562Scy  AC_SUBST(JDK_TOPDIR)
43254562Scy])
44254562Scy
45254562ScyAC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
46254562Scy[
47254562Scy  # This feature is no longer supported.
48254562Scy
49254562Scy  BASIC_DEPRECATED_ARG_WITH(add-source-root)
50254562Scy  BASIC_DEPRECATED_ARG_WITH(override-source-root)
51254562Scy  BASIC_DEPRECATED_ARG_WITH(adds-and-overrides)
52254562Scy  BASIC_DEPRECATED_ARG_WITH(override-langtools)
53254562Scy  BASIC_DEPRECATED_ARG_WITH(override-corba)
54254562Scy  BASIC_DEPRECATED_ARG_WITH(override-jaxp)
55254562Scy  BASIC_DEPRECATED_ARG_WITH(override-jaxws)
56254562Scy  BASIC_DEPRECATED_ARG_WITH(override-hotspot)
57254562Scy  BASIC_DEPRECATED_ARG_WITH(override-nashorn)
58254562Scy  BASIC_DEPRECATED_ARG_WITH(override-jdk)
59254562Scy])
60254562Scy
61254562ScyAC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
62254562Scy[
63254562Scy  BUILD_OUTPUT="$OUTPUT_ROOT"
64254562Scy  AC_SUBST(BUILD_OUTPUT)
65254562Scy  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
66254562Scy
67254562Scy  BASIC_DEPRECATED_ARG_WITH(import_hotspot)
68254562Scy])
69254562Scy
70254562Scy################################################################################
71254562Scy# Define a mechanism for importing extra prebuilt modules
72254562Scy#
73254562Scy
74254562ScyAC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
75254562Scy[
76254562Scy  AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules],
77254562Scy      [import a set of prebuilt modules either as a zip file or an exploded directory])])
78254562Scy
79254562Scy  if test "x$with_import_modules" != x \
80254562Scy      && test "x$with_import_modules" != "xno"; then
81254562Scy    if test -d "$with_import_modules"; then
82254562Scy      IMPORT_MODULES_TOPDIR="$with_import_modules"
83254562Scy      BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
84254562Scy    elif test -e "$with_import_modules"; then
85254562Scy      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
86254562Scy      $RM -rf "$IMPORT_MODULES_TOPDIR"
87254562Scy      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
88254562Scy      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
89254562Scy        AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
90254562Scy      fi
91254562Scy    else
92254562Scy      AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
93254562Scy    fi
94254562Scy  fi
95254562Scy
96254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
97254562Scy    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
98254562Scy  fi
99254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
100254562Scy    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
101254562Scy  fi
102254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
103254562Scy    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
104254562Scy  fi
105254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
106254562Scy    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
107254562Scy  fi
108254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
109254562Scy    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
110254562Scy  fi
111254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
112254562Scy    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
113254562Scy  fi
114254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
115254562Scy    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
116254562Scy  fi
117254562Scy  # Workaround for using different imported module-info.java in Jake due to a
118254562Scy  # change in format. Remove once new format is standard in JDK 9 and javafx
119254562Scy  # delivers just that.
120254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
121254562Scy    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
122254562Scy  fi
123254562Scy  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
124254562Scy    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
125254562Scy  fi
126254562Scy
127254562Scy  AC_SUBST(IMPORT_MODULES_CLASSES)
128254562Scy  AC_SUBST(IMPORT_MODULES_CMDS)
129254562Scy  AC_SUBST(IMPORT_MODULES_LIBS)
130254562Scy  AC_SUBST(IMPORT_MODULES_CONF)
131254562Scy  AC_SUBST(IMPORT_MODULES_LEGAL)
132254562Scy  AC_SUBST(IMPORT_MODULES_MAN)
133254562Scy  AC_SUBST(IMPORT_MODULES_SRC)
134254562Scy  AC_SUBST(IMPORT_MODULES_MAKE)
135254562Scy])
136254562Scy