summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorHyeongseok Oh <hseok82.oh@samasung.com>2016-12-05 11:32:59 +0900
committerHyeongseok Oh <hseok82.oh@samasung.com>2016-12-05 11:32:59 +0900
commitd06878377c5addeee92421ed9a287d1790c32cbc (patch)
tree1e37e8a57b56ae4f95bd652e606029d1fb080a86 /build.sh
parent5145193d4970eaf9a008014a7b02307611bd96ef (diff)
downloadcoreclr-d06878377c5addeee92421ed9a287d1790c32cbc.tar.gz
coreclr-d06878377c5addeee92421ed9a287d1790c32cbc.tar.bz2
coreclr-d06878377c5addeee92421ed9a287d1790c32cbc.zip
Change order in .builds and .pkgproj, fix build.sh for not modifying dir.prop
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh35
1 files changed, 21 insertions, 14 deletions
diff --git a/build.sh b/build.sh
index 7dc3f531f2..a434b2383c 100755
--- a/build.sh
+++ b/build.sh
@@ -56,29 +56,33 @@ usage()
exit 1
}
-initDistroRid()
+initHostDistroRid()
{
if [ "$__HostOS" == "Linux" ]; then
if [ ! -e /etc/os-release ]; then
echo "WARNING: Can not determine runtime id for current distro."
- export __DistroRid=""
+ __HostDistroRid=""
else
source /etc/os-release
- export __DistroRid="$ID.$VERSION_ID-$__HostArch"
+ __HostDistroRid="$ID.$VERSION_ID-$__HostArch"
fi
fi
}
initTargetDistroRid()
{
- if [ "$__BuildOS" == "Linux" ]; then
- if [ ! -e /etc/os-release ]; then
- echo "WARNING: Can not determine runtime id for current distro."
- export __CrossDistroRid=""
- else
- source $ROOTFS_DIR/etc/os-release
- export __CrossDistroRid="$ID.$VERSION_ID-$__BuildArch"
+ if [ $__CrossBuild == 1 ]; then
+ if [ "$__BuildOS" == "Linux" ]; then
+ if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
+ echo "WARNING: Can not determine runtime id for current distro."
+ export __DistroRid=""
+ else
+ source $ROOTFS_DIR/etc/os-release
+ export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
+ fi
fi
+ else
+ export __DistroRid="$__HostDistroRid"
fi
}
@@ -241,7 +245,7 @@ isMSBuildOnNETCoreSupported()
if [ "$__HostArch" == "x64" ]; then
if [ "$__HostOS" == "Linux" ]; then
- case "$__DistroRid" in
+ case "$__HostDistroRid" in
"centos.7-x64")
__isMSBuildOnNETCoreSupported=1
;;
@@ -489,6 +493,7 @@ __CrossBuild=0
__ClangMajorVersion=0
__ClangMinorVersion=0
__NuGetPath="$__PackagesDir/NuGet.exe"
+__HostDistroRid=""
__DistroRid=""
__cmakeargs=""
__SkipGenerateVersion=0
@@ -677,8 +682,8 @@ fi
# Set dependent variables
__LogsDir="$__RootBinDir/Logs"
-# init the distro name
-initDistroRid
+# init the host distro name
+initHostDistroRid
# Set the remaining variables based upon the determined build configuration
__BinDir="$__RootBinDir/Product/$__BuildOS.$__BuildArch.$__BuildType"
@@ -712,9 +717,11 @@ if [ $__CrossBuild == 1 ]; then
if ! [[ -n "$ROOTFS_DIR" ]]; then
export ROOTFS_DIR="$__ProjectRoot/cross/rootfs/$__BuildArch"
fi
- initTargetDistroRid
fi
+# init the target distro name
+initTargetDistroRid
+
# Make the directories necessary for build if they don't exist
setup_dirs