hotspot/make/windows/create_obj_files.sh
author trims
Thu, 13 Jan 2011 22:53:34 -0800
changeset 7882 6cb8e9ad60da
parent 7451 cc12e11b1e07
child 8114 340b5b8b544b
permissions -rw-r--r--
7012348: Bump the HS20 build number to 07 Summary: Update the HS20 build number to 07 Reviewed-by: jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     1
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     2
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     4
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     7
# published by the Free Software Foundation.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     8
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    13
# accompanied this code).
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    14
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    18
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    21
# questions.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    22
#  
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    23
#
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    24
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    25
set -e
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    26
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    27
# Note that we currently do not have a way to set HotSpotMksHome in
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    28
# the batch build, but so far this has not seemed to be a problem. The
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    29
# reason this environment variable is necessary is that it seems that
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    30
# Windows truncates very long PATHs when executing shells like MKS's
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    31
# sh, and it has been found that sometimes `which sh` fails.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    32
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    33
if [ "x$HotSpotMksHome" != "x" ]; then
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    34
  TOOL_DIR="$HotSpotMksHome"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    35
else
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    36
  # HotSpotMksHome is not set so use the directory that contains "sh".
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    37
  # This works with both MKS and Cygwin.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    38
  SH=`which sh`
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    39
  TOOL_DIR=`dirname "$SH"`
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    40
fi
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    41
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    42
DIRNAME="$TOOL_DIR/dirname"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    43
FIND="$TOOL_DIR/find"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    44
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    45
TYPE=$1
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    46
Platform_arch=$2
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    47
Platform_arch_model=$3
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    48
Platform_os_family=windows
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    49
Platform_os_arch=windows_$Platform_arch
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    50
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    51
WorkSpace=$4
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    52
GENERATED=$5
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    53
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    54
BASE_PATHS="` $FIND ${WorkSpace}/src/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    55
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/share/vm/gc_implementation/shared"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    56
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os/${Platform_os_family}/vm"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    57
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/cpu/${Platform_arch}/vm"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    58
BASE_PATHS="${BASE_PATHS} ${WorkSpace}/src/os_cpu/${Platform_os_arch}/vm"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    59
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    60
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    61
CORE_PATHS="${BASE_PATHS}"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    62
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    63
CORE_PATHS="${CORE_PATHS} `$FIND ${WorkSpace}/src/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    64
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    65
COMPILER1_PATHS="${WorkSpace}/src/share/vm/c1"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    66
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    67
COMPILER2_PATHS="${WorkSpace}/src/share/vm/opto"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    68
COMPILER2_PATHS="${COMPILER2_PATHS} ${WorkSpace}/src/share/vm/libadt"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    69
COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    70
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    71
# Include dirs per type.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    72
case "${TYPE}" in
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    73
    "core")      Src_Dirs="${CORE_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    74
    "kernel")    Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    75
    "compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    76
    "compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    77
    "tiered")    Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    78
    "zero")      Src_Dirs="${CORE_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    79
    "shark")     Src_Dirs="${CORE_PATHS}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    80
esac
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    81
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    82
COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp chaitin* c2_* runtime_*"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    83
COMPILER1_SPECIFIC_FILES="c1_*"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    84
SHARK_SPECIFIC_FILES="shark"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    85
ZERO_SPECIFIC_FILES="zero"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    86
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    87
# These files need to be excluded when building the kernel target.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    88
KERNEL_EXCLUDED_FILES="attachListener.cpp attachListener_windows.cpp dump.cpp dump_${Platform_arch_model}.cpp forte.cpp fprofiler.cpp heapDumper.cpp heapInspection.cpp jniCheck.cpp jvmtiCodeBlobEvents.cpp jvmtiExtensions.cpp jvmtiImpl.cpp jvmtiRawMonitor.cpp jvmtiTagMap.cpp jvmtiTrace.cpp restore.cpp serialize.cpp vmStructs.cpp g1MemoryPool.cpp psMemoryPool.cpp gcAdaptivePolicyCounters.cpp concurrentGCThread.cpp mutableNUMASpace.cpp allocationStats.cpp gSpaceCounters.cpp immutableSpace.cpp mutableSpace.cpp spaceCounters.cpp yieldingWorkgroup.cpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    89
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    90
# Always exclude these.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    91
Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    92
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    93
# Exclude per type.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    94
case "${TYPE}" in
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    95
    "core")      Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    96
    "kernel")    Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ${KERNEL_EXCLUDED_FILES} ciTypeFlow.cpp" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    97
    "compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    98
    "compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
    99
    "tiered")    Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   100
    "zero")      Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   101
    "shark")     Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES}" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   102
esac
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   103
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   104
# Special handling of arch model.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   105
case "${Platform_arch_model}" in
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   106
	"x86_32") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_64*" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   107
	"x86_64") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_32*" ;;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   108
esac
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   109
7451
cc12e11b1e07 7006659: temporary adlc files are added to the build variables
stefank
parents: 7397
diff changeset
   110
# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE.
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   111
function findsrc {
7451
cc12e11b1e07 7006659: temporary adlc files are added to the build variables
stefank
parents: 7397
diff changeset
   112
    $FIND ${1}/. ! -name . -prune \
cc12e11b1e07 7006659: temporary adlc files are added to the build variables
stefank
parents: 7397
diff changeset
   113
		-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \
cc12e11b1e07 7006659: temporary adlc files are added to the build variables
stefank
parents: 7397
diff changeset
   114
		-a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) \
cc12e11b1e07 7006659: temporary adlc files are added to the build variables
stefank
parents: 7397
diff changeset
   115
		| sed 's/.*\/\(.*\)/\1/';
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   116
}
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   117
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   118
Src_Files=
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   119
for e in ${Src_Dirs}; do
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   120
   Src_Files="${Src_Files}`findsrc ${e}` "
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   121
done 
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   122
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   123
Obj_Files=
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   124
for e in ${Src_Files}; do
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   125
	Obj_Files="${Obj_Files}${e%\.[!.]*}.obj "
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   126
done
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   127
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents:
diff changeset
   128
echo Obj_Files=${Obj_Files}