Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
karianna committed Mar 27, 2018
1 parent 66d1d67 commit 9dbe9f5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
23 changes: 19 additions & 4 deletions makejdk-any-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# TODO 9 should become 9u as will 10 shortly....

set -x # TODO remove this once we've finished
# set -x # TODO remove this once we've finished

# The OS kernel name, e.g. 'darwin' for Mac OS X
export OS_KERNEL_NAME=""
Expand Down Expand Up @@ -53,20 +53,26 @@ parseCommandLineArgs()
"--variant" | "-bv")
BUILD_VARIANT=$(echo "$1" | awk "{print $string}")
shift;;

# Bypass the other flags (we'll process them again in makejdk.sh
*) shift;;
esac

# Ignore all of the remaining arguments except for the last one
if [[ $# -gt 1 ]] && [[ ."$1" != .-* ]]; then
shift;
fi
done

# Now that we've processed the flags, grab the mandatory argument(s)
OPENJDK_FOREST_NAME=$(echo "$1" | awk "{print $string}")
echo "OPENJDK_FOREST_NAME=${OPENJDK_FOREST_NAME}"
export OPENJDK_CORE_VERSION=${OPENJDK_FOREST_NAME}

# 'u' means it's an update repo, e.g. jdk8u
if [[ ${OPENJDK_FOREST_NAME} == *u ]]; then
export OPENJDK_CORE_VERSION=${OPENJDK_FOREST_NAME%?}
fi

echo "OPENJDK_CORE_VERSION=${OPENJDK_CORE_VERSION}"

}

setVariablesBeforeCallingConfigure() {
Expand All @@ -84,6 +90,12 @@ setVariablesBeforeCallingConfigure() {
echo "Please specify a version, either jdk8, jdk9, jdk10 etc, with or without a 'u' suffix. e.g. $0 [options] jdk8u"
exit 1
fi

echo "JDK_PATH=${JDK_PATH}"
echo "JRE_PATH=${JRE_PATH}"
echo "CONFIGURE_ARGS_FOR_ANY_PLATFORM=${CONFIGURE_ARGS_FOR_ANY_PLATFORM}"
echo "COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG=${COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG}"
echo "COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG=${COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG}"
}

# Set the repository, defaults to AdoptOpenJDK/openjdk-$OPENJDK_FOREST_NAME
Expand Down Expand Up @@ -138,10 +150,13 @@ setMakeCommandForOS() {
esac
}

echo "Starting $0 to set environment variables before calling makejdk.sh"
parseCommandLineArgs "$@"
setVariablesBeforeCallingConfigure
setRepository
processArgumentsforSpecificArchitectures
setMakeCommandForOS

echo "About to call makejdk.sh"

./makejdk.sh "$@"
6 changes: 3 additions & 3 deletions makejdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#
################################################################################################

set -x # TODO remove once we've finished debugging
# set -x # TODO remove once we've finished debugging

# TODO This only exists for backwards compatibility - remove once all jenkins jobs have migrated
OS_ARCHITECTURE=$OS_MACHINE_NAME
Expand Down Expand Up @@ -256,7 +256,7 @@ setWorkingDirectory()
echo "${info}WORKING_DIR is undefined so setting to ${PWD}${normal}."
WORKING_DIR=$PWD
else
echo "${info}Working dir is ${WORKING_DIR}${normal}."
echo "${info}Working dir is ${WORKING_DIR}${normal}"
fi
}

Expand Down Expand Up @@ -345,7 +345,7 @@ getOpenJDKUpdateAndBuildVersion()
# It does exist and it's a repo other than the AdoptOpenJDK one
cd "${WORKING_DIR}/${OPENJDK_SOURCE_DIR}" || return
echo "${git}Pulling latest tags and getting the latest update version using git fetch -q --tags ${SHALLOW_CLONE_OPTION}"
git fetch -v --tags "${SHALLOW_CLONE_OPTION}"
git fetch -q --tags "${SHALLOW_CLONE_OPTION}"
OPENJDK_REPO_TAG=${TAG:-$(getFirstTagFromOpenJDKGitRepo)} # getFirstTagFromOpenJDKGitRepo resides in sbin/common-functions.sh
if [[ "${OPENJDK_REPO_TAG}" == "" ]] ; then
echo "${error}Unable to detect git tag, exiting..."
Expand Down
4 changes: 3 additions & 1 deletion sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,13 @@ removingUnnecessaryFiles()
{
echo "Removing unnecessary files now..."

echo "Fetching the first tag from the OpenJDK git repo..."
if [ -z "$OPENJDK_REPO_TAG" ]; then
echo "Fetching the first tag from the OpenJDK git repo..."
echo "Dir=${PWD}"
OPENJDK_REPO_TAG=$(getFirstTagFromOpenJDKGitRepo)
fi
if [ "$USE_DOCKER" != "true" ] ; then
echo "Removing cacerrts"
rm -rf cacerts_area
fi

Expand Down
4 changes: 3 additions & 1 deletion sbin/common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

# Common functions to be used in scripts

# set -x

ALSA_LIB_VERSION=${ALSA_LIB_VERSION:-1.0.27.2}
FREETYPE_FONT_SHARED_OBJECT_FILENAME=libfreetype.so.6.5.0
FREETYPE_FONT_VERSION=${FREETYPE_FONT_VERSION:-2.4.0}
Expand Down Expand Up @@ -70,7 +72,7 @@ checkingAndDownloadingFreemarker()

checkingAndDownloadingFreeType()
{
echo "Checking for freetype $WORKING_DIR $OPENJDK_SOURCE_DIR "
echo "Checking for freetype at $WORKING_DIR/$OPENJDK_SOURCE_DIR"

FOUND_FREETYPE=$(find "$WORKING_DIR/$OPENJDK_SOURCE_DIR/installedfreetype/lib" -name "${FREETYPE_FONT_SHARED_OBJECT_FILENAME}")

Expand Down

0 comments on commit 9dbe9f5

Please sign in to comment.