make/autoconf/source-dirs.m4
author erikj
Tue, 12 Sep 2017 19:03:56 +0200
changeset 47217 72e3ae9a25eb
parent 47216 71c04702a3d5
child 47219 fd36993f7bf5
permissions -rw-r--r--
8187444: Forest Consolidation: Make build work Reviewed-by: darcy, ihse Contributed-by: erik.joelsson@oracle.com, maurizio.cimadamore@oracle.com, sundararajan.athijegannathan@oracle.com, jonathan.gibbons@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     1
#
41458
f285e333e8db 8167424: Various trivial fixes in build system
ihse
parents: 36506
diff changeset
     2
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     4
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    10
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    15
# accompanied this code).
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    16
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    20
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    23
# questions.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    24
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    25
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    26
AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    27
[
33442
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    28
  # Where are the sources.
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    29
  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    30
  CORBA_TOPDIR="$SRC_ROOT/corba"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    31
  JAXP_TOPDIR="$SRC_ROOT/jaxp"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    32
  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    33
  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    34
  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    35
  JDK_TOPDIR="$SRC_ROOT/jdk"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    36
  AC_SUBST(LANGTOOLS_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    37
  AC_SUBST(CORBA_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    38
  AC_SUBST(JAXP_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    39
  AC_SUBST(JAXWS_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    40
  AC_SUBST(HOTSPOT_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    41
  AC_SUBST(NASHORN_TOPDIR)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    42
  AC_SUBST(TOPDIR)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    43
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    44
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    45
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    46
[
33442
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    47
  # This feature is no longer supported.
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    48
33442
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    49
  BASIC_DEPRECATED_ARG_WITH(add-source-root)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    50
  BASIC_DEPRECATED_ARG_WITH(override-source-root)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    51
  BASIC_DEPRECATED_ARG_WITH(adds-and-overrides)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    52
  BASIC_DEPRECATED_ARG_WITH(override-langtools)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    53
  BASIC_DEPRECATED_ARG_WITH(override-corba)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    54
  BASIC_DEPRECATED_ARG_WITH(override-jaxp)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    55
  BASIC_DEPRECATED_ARG_WITH(override-jaxws)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    56
  BASIC_DEPRECATED_ARG_WITH(override-hotspot)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    57
  BASIC_DEPRECATED_ARG_WITH(override-nashorn)
f75b19e407af 8141414: Deprecate configure source overriding
ihse
parents: 21759
diff changeset
    58
  BASIC_DEPRECATED_ARG_WITH(override-jdk)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    59
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    60
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    61
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    62
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    63
  BUILD_OUTPUT="$OUTPUT_ROOT"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    64
  AC_SUBST(BUILD_OUTPUT)
42510
406dfb60de57 8170284: Move fine granular hotspot make targets to top level
erikj
parents: 41458
diff changeset
    65
  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    66
42510
406dfb60de57 8170284: Move fine granular hotspot make targets to top level
erikj
parents: 41458
diff changeset
    67
  BASIC_DEPRECATED_ARG_WITH(import_hotspot)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    68
])
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    69
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    70
################################################################################
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    71
# Define a mechanism for importing extra prebuilt modules
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    72
#
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    73
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    74
AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    75
[
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    76
  AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules],
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    77
      [import a set of prebuilt modules either as a zip file or an exploded directory])])
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    78
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    79
  if test "x$with_import_modules" != x \
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    80
      && test "x$with_import_modules" != "xno"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    81
    if test -d "$with_import_modules"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    82
      IMPORT_MODULES_TOPDIR="$with_import_modules"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    83
      BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    84
    elif test -e "$with_import_modules"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    85
      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    86
      $RM -rf "$IMPORT_MODULES_TOPDIR"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    87
      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    88
      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    89
        AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    90
      fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    91
    else
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    92
      AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    93
    fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    94
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    95
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    96
  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    97
    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    98
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
    99
  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   100
    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   101
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   102
  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   103
    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   104
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   105
  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   106
    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   107
  fi
42505
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   108
  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   109
    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   110
  fi
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   111
  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   112
    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
11439b0c0792 8169925: Organize licenses by module in source, JMOD file, and run-time image
mchung
parents: 42289
diff changeset
   113
  fi
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   114
  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   115
    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   116
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   117
  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   118
    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   119
  fi
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   120
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   121
  AC_SUBST(IMPORT_MODULES_CLASSES)
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   122
  AC_SUBST(IMPORT_MODULES_CMDS)
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   123
  AC_SUBST(IMPORT_MODULES_LIBS)
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   124
  AC_SUBST(IMPORT_MODULES_CONF)
42519
f67db45ebdbd 8171249: modules_legal from imported modules are not read by the build
erikj
parents: 42513
diff changeset
   125
  AC_SUBST(IMPORT_MODULES_LEGAL)
f67db45ebdbd 8171249: modules_legal from imported modules are not read by the build
erikj
parents: 42513
diff changeset
   126
  AC_SUBST(IMPORT_MODULES_MAN)
36506
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   127
  AC_SUBST(IMPORT_MODULES_SRC)
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   128
  AC_SUBST(IMPORT_MODULES_MAKE)
17612cee3530 8142968: Module System implementation
alanb
parents: 33442
diff changeset
   129
])