common/autoconf/source-dirs.m4
author shade
Tue, 01 Sep 2015 12:57:41 +0300
changeset 32467 23b29549f8d1
parent 21759 e24e22311718
child 33442 f75b19e407af
permissions -rw-r--r--
8076758: new StringBuilder().append(String).toString() should be recognized by OptimizeStringConcat Reviewed-by: kvn, thartmann
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
#
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
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
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    28
  # Where are the sources. Any of these can be overridden
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    29
  # using --with-override-corba and the likes.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    30
  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    31
  CORBA_TOPDIR="$SRC_ROOT/corba"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    32
  JAXP_TOPDIR="$SRC_ROOT/jaxp"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    33
  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    34
  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    35
  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    36
  JDK_TOPDIR="$SRC_ROOT/jdk"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    37
  AC_SUBST(LANGTOOLS_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    38
  AC_SUBST(CORBA_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    39
  AC_SUBST(JAXP_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    40
  AC_SUBST(JAXWS_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    41
  AC_SUBST(HOTSPOT_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    42
  AC_SUBST(NASHORN_TOPDIR)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    43
  AC_SUBST(JDK_TOPDIR)
13133
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
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    46
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    47
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    48
[
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    49
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    50
  ###############################################################################
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    51
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    52
  # Pickup additional source for a component from outside of the source root
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    53
  # or override source for a component.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    54
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    55
  AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    56
      [for each and every source directory, look in this additional source root for
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    57
      the same directory; if it exists and have files in it, include it in the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    58
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    59
  AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    60
      [for each and every source directory, look in this override source root for
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    61
      the same directory; if it exists, use that directory instead and
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    62
      ignore the directory in the original source root])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    63
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    64
  AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    65
      [use the subdirs 'adds' and 'overrides' in the specified directory as
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    66
      add-source-root and override-source-root])])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    67
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    68
  if test "x$with_adds_and_overrides" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    69
    with_add_source_root="$with_adds_and_overrides/adds"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    70
    with_override_source_root="$with_adds_and_overrides/overrides"
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    71
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    72
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    73
  if test "x$with_add_source_root" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    74
    if ! test -d $with_add_source_root; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    75
      AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    76
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    77
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    78
    cd "$with_add_source_root"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    79
    ADD_SRC_ROOT="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    80
    cd "$CURDIR"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    81
    # Verify that the addon source root does not have any root makefiles.
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    82
    # If it does, then it is usually an error, prevent this.
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    83
    if test -f $with_add_source_root/langtools/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    84
      AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    85
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    86
    if test -f $with_add_source_root/corba/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    87
      AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    88
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    89
    if test -f $with_add_source_root/jaxp/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    90
      AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    91
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    92
    if test -f $with_add_source_root/jaxws/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    93
      AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    94
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    95
    if test -f $with_add_source_root/hotspot/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    96
      AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
    97
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
    98
    if test -f $with_add_source_root/nashorn/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
    99
      AC_MSG_ERROR([Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources.])
19757
0643857696ee 8010185: Build should support --with-override-nashorn
ihse
parents: 15903
diff changeset
   100
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   101
    if test -f $with_add_source_root/jdk/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   102
      AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   103
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   104
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   105
  AC_SUBST(ADD_SRC_ROOT)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   106
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   107
  if test "x$with_override_source_root" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   108
    if ! test -d $with_override_source_root; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   109
      AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   110
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   111
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   112
    cd "$with_override_source_root"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   113
    OVERRIDE_SRC_ROOT="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   114
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   115
    if test -f $with_override_source_root/langtools/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   116
      AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   117
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   118
    if test -f $with_override_source_root/corba/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   119
      AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   120
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   121
    if test -f $with_override_source_root/jaxp/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   122
      AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   123
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   124
    if test -f $with_override_source_root/jaxws/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   125
      AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   126
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   127
    if test -f $with_override_source_root/hotspot/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   128
      AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   129
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   130
    if test -f $with_override_source_root/nashorn/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   131
      AC_MSG_ERROR([Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override.])
19757
0643857696ee 8010185: Build should support --with-override-nashorn
ihse
parents: 15903
diff changeset
   132
    fi
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   133
    if test -f $with_override_source_root/jdk/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   134
      AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   135
    fi
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   136
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   137
  AC_SUBST(OVERRIDE_SRC_ROOT)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   138
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   139
  ###############################################################################
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   140
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   141
  # Override a repo completely, this is used for example when you have 3 small
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   142
  # development sandboxes of the langtools sources and want to avoid having 3 full
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   143
  # OpenJDK sources checked out on disk.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   144
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   145
  # Assuming that the 3 langtools sandboxes are located here:
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   146
  # /home/fredrik/sandbox1/langtools
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   147
  # /home/fredrik/sandbox2/langtools
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   148
  # /home/fredrik/sandbox3/langtools
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   149
  #
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   150
  # From the source root you create build subdirs manually:
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   151
  #     mkdir -p build1 build2 build3
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   152
  # in each build directory run:
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   153
  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   154
  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   155
  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   156
  #
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   157
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   158
  AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   159
      [use this langtools dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   160
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   161
  AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   162
      [use this corba dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   163
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   164
  AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   165
      [use this jaxp dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   166
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   167
  AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   168
      [use this jaxws dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   169
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   170
  AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   171
      [use this hotspot dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   172
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   173
  AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   174
      [use this nashorn dir for the build])])
19757
0643857696ee 8010185: Build should support --with-override-nashorn
ihse
parents: 15903
diff changeset
   175
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   176
  AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   177
      [use this jdk dir for the build])])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   178
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   179
  if test "x$with_override_langtools" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   180
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   181
    cd "$with_override_langtools"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   182
    LANGTOOLS_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   183
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   184
    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   185
      AC_MSG_ERROR([You have to override langtools with a full langtools repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   186
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   187
    AC_MSG_CHECKING([if langtools should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   188
    AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   189
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   190
  if test "x$with_override_corba" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   191
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   192
    cd "$with_override_corba"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   193
    CORBA_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   194
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   195
    if ! test -f $CORBA_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   196
      AC_MSG_ERROR([You have to override corba with a full corba repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   197
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   198
    AC_MSG_CHECKING([if corba should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   199
    AC_MSG_RESULT([yes with $CORBA_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   200
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   201
  if test "x$with_override_jaxp" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   202
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   203
    cd "$with_override_jaxp"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   204
    JAXP_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   205
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   206
    if ! test -f $JAXP_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   207
      AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   208
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   209
    AC_MSG_CHECKING([if jaxp should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   210
    AC_MSG_RESULT([yes with $JAXP_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   211
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   212
  if test "x$with_override_jaxws" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   213
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   214
    cd "$with_override_jaxws"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   215
    JAXWS_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   216
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   217
    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   218
      AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   219
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   220
    AC_MSG_CHECKING([if jaxws should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   221
    AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   222
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   223
  if test "x$with_override_hotspot" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   224
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   225
    cd "$with_override_hotspot"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   226
    HOTSPOT_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   227
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   228
    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   229
      AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   230
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   231
    AC_MSG_CHECKING([if hotspot should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   232
    AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   233
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   234
  if test "x$with_override_nashorn" != x; then
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   235
    CURDIR="$PWD"
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   236
    cd "$with_override_nashorn"
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   237
    NASHORN_TOPDIR="`pwd`"
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   238
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   239
    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   240
      AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
15903
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   241
    fi
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   242
    AC_MSG_CHECKING([if nashorn should be overridden])
bc0e6cd9d760 8008914: Add nashorn to the tl build
jjg
parents: 14378
diff changeset
   243
    AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   244
  fi
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   245
  if test "x$with_override_jdk" != x; then
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   246
    CURDIR="$PWD"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   247
    cd "$with_override_jdk"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   248
    JDK_TOPDIR="`pwd`"
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   249
    cd "$CURDIR"
21759
e24e22311718 8027566: Remove the old build system
ihse
parents: 20363
diff changeset
   250
    if ! test -f $JDK_TOPDIR/make/Makefile; then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   251
      AC_MSG_ERROR([You have to override JDK with a full JDK repo!])
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   252
    fi
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   253
    AC_MSG_CHECKING([if JDK should be overridden])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   254
    AC_MSG_RESULT([yes with $JDK_TOPDIR])
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   255
  fi
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   256
])
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   257
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   258
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   259
[
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   260
  BUILD_OUTPUT="$OUTPUT_ROOT"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   261
  AC_SUBST(BUILD_OUTPUT)
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   262
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   263
  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   264
  BUILD_HOTSPOT=true
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   265
  AC_SUBST(HOTSPOT_DIST)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   266
  AC_SUBST(BUILD_HOTSPOT)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   267
  AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   268
  [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   269
  if test "x$with_import_hotspot" != x; then
14378
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   270
    CURDIR="$PWD"
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   271
    cd "$with_import_hotspot"
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   272
    HOTSPOT_DIST="`pwd`"
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   273
    cd "$CURDIR"
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   274
    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   275
      AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!])
14378
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   276
    fi
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   277
    AC_MSG_CHECKING([if hotspot should be imported])
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   278
    AC_MSG_RESULT([yes from $HOTSPOT_DIST])
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   279
    BUILD_HOTSPOT=false
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   280
  fi
14378
0ef5d942b98e 8002028: build-infra: need no-hotspot partial build
tbell
parents: 13697
diff changeset
   281
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 19757
diff changeset
   282
  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
13133
701e61c32ece 7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff changeset
   283
])