Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Duke committed Feb 4, 2021
2 parents 2084c20 + 111dccb commit 45c28e5
Show file tree
Hide file tree
Showing 27 changed files with 38,830 additions and 22,633 deletions.
3 changes: 3 additions & 0 deletions .hgtags-top-repo
Original file line number Diff line number Diff line change
Expand Up @@ -844,3 +844,6 @@ c3d51ddc22653f63cd6c06e5f2c5b1e7192194e6 jdk8u172-b07
20086fb0be29b3e82a3841d3c1829f1437976f27 jdk8u172-b08
9361e8414bf1b1bbba36ecf4b81687ae254c1e63 jdk8u172-b09
ff9f47b14b8a0302a90ad9a4d793073205de52e2 jdk8u172-b10
4d038b84d11353246e218d8f8dcd04637e09ee6d jdk8u172-b11
3b5b53db61f2aaa5a94fd9ca51162d83565faabe jdk8u182-b00
dcfe85bcd9017741198b4e4a2045fdaaab212c74 jdk8u192-b00
4 changes: 2 additions & 2 deletions common/autoconf/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand All @@ -24,4 +24,4 @@
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT
SPEC:=@OUTPUT_ROOT@/spec.gmk
include @SRC_ROOT@/Makefile
include @TOPDIR@/Makefile
42 changes: 29 additions & 13 deletions common/autoconf/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@
# questions.
#

generate_configure_script() {
# First create a header
cat > $1 << EOT
#!/bin/bash
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
EOT
# Then replace "magic" variables in configure.ac and append the output
# from autoconf. $2 is either cat (just a no-op) or a filter.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
eval $2 | ${AUTOCONF} -W all -I$script_dir - >> $1
rm -rf autom4te.cache
}

script_dir=`dirname $0`

# Create a timestamp as seconds since epoch
Expand All @@ -36,7 +53,8 @@ else
fi

if test "x$CUSTOM_CONFIG_DIR" = "x"; then
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
topdir=`cd $script_dir/../.. >/dev/null && pwd`
custom_script_dir="$topdir/jdk/make/closed/autoconf"
else
custom_script_dir=$CUSTOM_CONFIG_DIR
fi
Expand All @@ -45,25 +63,23 @@ custom_hook=$custom_script_dir/custom-hook.m4

AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"

echo "Autoconf found: ${AUTOCONF}"

if test "x${AUTOCONF}" = x; then
echo You need autoconf installed to be able to regenerate the configure script
echo Error: Cannot find autoconf 1>&2
echo "You need autoconf installed to be able to regenerate the configure script"
echo "Error: Cannot find autoconf" 1>&2
exit 1
fi

echo Generating generated-configure.sh with ${AUTOCONF}
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | ${AUTOCONF} -W all -I$script_dir - > $script_dir/generated-configure.sh
rm -rf autom4te.cache
autoconf_version=`$AUTOCONF --version | head -1`
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"

echo "Generating generated-configure.sh"
generate_configure_script "$script_dir/generated-configure.sh" 'cat'

if test -e $custom_hook; then
echo Generating custom generated-configure.sh
# We have custom sources available; also generate configure script
# with custom hooks compiled in.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
rm -rf autom4te.cache
echo "Generating custom generated-configure.sh"
generate_configure_script "$custom_script_dir/generated-configure.sh" 'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
else
echo No custom hook found: $custom_hook
echo "(No custom hook found at $custom_hook)"
fi
Loading

0 comments on commit 45c28e5

Please sign in to comment.