mirror of
https://github.com/espressif/openthread.git
synced 2026-07-23 12:34:07 +00:00
[build] sync with latest nlbuild-autotools repo (#2657)
This commit is contained in:
+1
-1
@@ -1505,7 +1505,7 @@ CPPFLAGS="${CPPFLAGS} ${MBEDTLS_CPPFLAGS}"
|
||||
# Add any code coverage CPPFLAGS and LDFLAGS
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${NL_COVERAGE_CPPFLAGS}"
|
||||
LDFLAGS="${LDFLAGS} ${NL_COVERAGE_LDFLAGS}"
|
||||
LIBS="${LIBS} ${NL_COVERAGE_LIBS}"
|
||||
|
||||
# At this point, we can restore the compiler flags to whatever the
|
||||
# user passed in, now that we're clear of an -Werror issues by
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.4
|
||||
1.4.4
|
||||
|
||||
+25
-1
@@ -1,10 +1,34 @@
|
||||
1.4.4 (2018-02-06)
|
||||
|
||||
* Addressed an issue where 'mkskeleton' failed while trying to
|
||||
generate "third_party/Makefile.am".
|
||||
|
||||
1.4.3 (2018-02-01)
|
||||
|
||||
* Addressed an issue with NL_{SAVE,RESTORE}_WERROR in which
|
||||
-Werror=<specific> was not handled.
|
||||
|
||||
1.4.2 (2017-06-20)
|
||||
|
||||
* Addressed an issue with the 'make coverage' target where certain
|
||||
make versions may have sensitivites to trailing slashes in order-
|
||||
only targets.
|
||||
|
||||
1.4.1 (2017-06-19)
|
||||
|
||||
* Refactored m4 and autotools auxilliary files to ensure that
|
||||
third-party content remains under third_party/....
|
||||
* Addressed issues with generating distributions on Mac OS X
|
||||
where GNU software, including wget, is not available in PATH.
|
||||
* Addressed issue with missing files in MANIFEST.
|
||||
|
||||
1.4 (2017-06-15)
|
||||
|
||||
* Remove package archives and prebuilt in-package binaries.
|
||||
* Ensure that GNU tool build process is completely self-sufficient
|
||||
and has no dependencies on installed host binaries.
|
||||
* Add support for generating versioned core and prebuilt package binary
|
||||
distirubtions.
|
||||
distributions.
|
||||
* Ensure that 'bootstrap' can work with either prebuilt in-package
|
||||
binaries or with installed host binaries.
|
||||
|
||||
|
||||
+29
-26
@@ -1,34 +1,15 @@
|
||||
.default-version
|
||||
.gitignore
|
||||
CHANGES
|
||||
Common.mak
|
||||
CONTRIBUTING.md
|
||||
LICENSE
|
||||
MANIFEST
|
||||
Makefile
|
||||
README.md
|
||||
autoconf/ar-lib
|
||||
autoconf/compile
|
||||
autoconf/config.guess
|
||||
autoconf/config.sub
|
||||
autoconf/depcomp
|
||||
autoconf/install-sh
|
||||
autoconf/ltmain.sh
|
||||
autoconf/m4/ax_check_compiler.m4
|
||||
autoconf/m4/ax_check_file.m4
|
||||
autoconf/m4/ax_check_preprocessor.m4
|
||||
autoconf/m4/ax_compare_version.m4
|
||||
autoconf/m4/ax_cxx_compile_stdcxx.m4
|
||||
autoconf/m4/ax_cxx_compile_stdcxx_0x.m4
|
||||
autoconf/m4/ax_cxx_compile_stdcxx_11.m4
|
||||
autoconf/m4/ax_cxx_compile_stdcxx_14.m4
|
||||
autoconf/m4/ax_jni_include_dir.m4
|
||||
autoconf/m4/ax_prog_doxygen.m4
|
||||
autoconf/m4/ax_pthread.m4
|
||||
autoconf/m4/libtool.m4
|
||||
autoconf/m4/ltoptions.m4
|
||||
autoconf/m4/ltsugar.m4
|
||||
autoconf/m4/ltversion.m4
|
||||
autoconf/m4/lt~obsolete.m4
|
||||
autoconf/m4/nl_enable_coverage.m4
|
||||
autoconf/m4/nl_enable_coverage_reporting.m4
|
||||
autoconf/m4/nl_enable_debug.m4
|
||||
@@ -40,11 +21,6 @@ autoconf/m4/nl_filtered_canonical.m4
|
||||
autoconf/m4/nl_prog_lndir.m4
|
||||
autoconf/m4/nl_werror.m4
|
||||
autoconf/m4/nl_with_package.m4
|
||||
autoconf/m4/pkg.m4
|
||||
autoconf/missing
|
||||
autoconf/mkinstalldirs
|
||||
autoconf/py-compile
|
||||
autoconf/test-driver
|
||||
automake/post.am
|
||||
automake/post/rules.am
|
||||
automake/post/rules/coverage.am
|
||||
@@ -71,10 +47,37 @@ scripts/bootstrap
|
||||
scripts/bootstrap-configure
|
||||
scripts/mkskeleton
|
||||
scripts/mkversion
|
||||
third_party/autoconf/ar-lib
|
||||
third_party/autoconf/compile
|
||||
third_party/autoconf/config.guess
|
||||
third_party/autoconf/config.sub
|
||||
third_party/autoconf/depcomp
|
||||
third_party/autoconf/install-sh
|
||||
third_party/autoconf/ltmain.sh
|
||||
third_party/autoconf/m4/ax_compare_version.m4
|
||||
third_party/autoconf/m4/ax_cxx_compile_stdcxx.m4
|
||||
third_party/autoconf/m4/ax_cxx_compile_stdcxx_0x.m4
|
||||
third_party/autoconf/m4/ax_cxx_compile_stdcxx_11.m4
|
||||
third_party/autoconf/m4/ax_cxx_compile_stdcxx_14.m4
|
||||
third_party/autoconf/m4/ax_jni_include_dir.m4
|
||||
third_party/autoconf/m4/ax_prog_doxygen.m4
|
||||
third_party/autoconf/m4/ax_pthread.m4
|
||||
third_party/autoconf/m4/libtool.m4
|
||||
third_party/autoconf/m4/ltoptions.m4
|
||||
third_party/autoconf/m4/ltsugar.m4
|
||||
third_party/autoconf/m4/ltversion.m4
|
||||
third_party/autoconf/m4/lt~obsolete.m4
|
||||
third_party/autoconf/m4/pkg.m4
|
||||
third_party/autoconf/missing
|
||||
third_party/autoconf/mkinstalldirs
|
||||
third_party/autoconf/py-compile
|
||||
third_party/autoconf/test-driver
|
||||
tools/Makefile
|
||||
tools/packages/autoconf/autoconf.url
|
||||
tools/packages/autoconf/autoconf.version
|
||||
tools/packages/automake/automake.url
|
||||
tools/packages/automake/automake.version
|
||||
tools/packages/build
|
||||
tools/packages/coreutils/coreutils.url
|
||||
tools/packages/coreutils/coreutils.version
|
||||
tools/packages/libtool/libtool.url
|
||||
@@ -83,4 +86,4 @@ tools/packages/m4/m4.url
|
||||
tools/packages/m4/m4.version
|
||||
tools/packages/make/make.url
|
||||
tools/packages/make/make.version
|
||||
|
||||
tools/packages/packages
|
||||
|
||||
+23
-2
@@ -10,6 +10,14 @@ not only building on and targeting against standalone build host
|
||||
systems but also embedded target systems using GCC-based or
|
||||
-compatible toolchains.
|
||||
|
||||
In addition, nlbuild-autotools endeavors to make it easy to support:
|
||||
|
||||
* Unit and Functional Tests (via 'make check')
|
||||
* Code Coverage (via 'make coverage')
|
||||
* Code Formatting (via 'make pretty' or 'make pretty-check')
|
||||
* Documentation
|
||||
* Distribution Generation (via 'make dist' or 'make docdist')
|
||||
|
||||
# Users and System Integrators
|
||||
|
||||
## Getting Started
|
||||
@@ -95,8 +103,12 @@ The nlbuild-autotools package is laid out as follows:
|
||||
| automake/post.am | GNU automake Makefile.am footer included by every makefile. |
|
||||
| automake/pre/ | GNU automake Makefile.am headers. |
|
||||
| automake/pre.am | GNU automake Makefile.am header included by every makefile. |
|
||||
| etc/ | Configurations files used by nlbuild-autotools. |
|
||||
| examples/ | Example template files for starting your own nlbuild-autotools-based project. |
|
||||
| scripts/ | Automation scripts for regenerating the build system and for managing package versions. |
|
||||
| third_party/ | Third-party code and infrastructure used by nlbuild-autotools. |
|
||||
| third_party/autoconf/ | GNU autoconf infrastructure provided by third-parties, including GNU. |
|
||||
| third_party/autoconf/m4/ | GNU m4 macros for configure.ac provided by third-parties, including GNU. |
|
||||
| tools/ | Qualified packages of and pre-built instances of GNU autotools. |
|
||||
| tools/host/ | Pre-built instances of GNU autotools (if installed). |
|
||||
| tools/host/i686-pc-cygwin/ | Pre-built instances of GNU autotools for 32-bit Cygwin (if installed). |
|
||||
@@ -105,7 +117,16 @@ The nlbuild-autotools package is laid out as follows:
|
||||
| tools/host/x86_64-unknown-linux-gnu/ | Pre-built instances of GNU autotools for 64-bit Linux (if installed). |
|
||||
| tools/packages/ | Qualified packages for GNU autotools. |
|
||||
|
||||
# FAQ {#FAQ}
|
||||
# Interact
|
||||
|
||||
There are numerous avenues for nlbuild-autotools support:
|
||||
|
||||
* Bugs and feature requests — [submit to the Issue Tracker](https://github.com/nestlabs/nlbuild-autotools/issues)
|
||||
* Google Groups — discussion and announcements
|
||||
* [nlbuild-autotools-announce](https://groups.google.com/forum/#!forum/nlbuild-autotools-announce) — release notes and new updates on nlbuild-autotools
|
||||
* [nlbuild-autotools-users](https://groups.google.com/forum/#!forum/nlbuild-autotools-users) — discuss use of and enhancements to nlbuild-autotools
|
||||
|
||||
# FAQ
|
||||
|
||||
Q: Why does nlbuild-autotools have an option for its own built versions
|
||||
of GNU autotools rather than leveraging whatever versions exist on
|
||||
@@ -177,4 +198,4 @@ for release cycle transparency and to maintain backwards compatibility.
|
||||
# License
|
||||
|
||||
nlbuild-autools is released under the [Apache License, Version 2.0 license](https://opensource.org/licenses/Apache-2.0).
|
||||
See the `LICENSE` file for more information.
|
||||
See the `LICENSE` file for more information.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
# whether the package will be built with or without code coverage.
|
||||
#
|
||||
# The value 'nl_cv_build_coverage' will be set to the result. In
|
||||
# addition, NL_COVERAGE_CPPFLAGS and NL_COVERAGE_LDFLAGS will be set
|
||||
# addition, NL_COVERAGE_CPPFLAGS and NL_COVERAGE_LIBS will be set
|
||||
# to the appropriate values to pass to the compiler and linker,
|
||||
# respectively.
|
||||
#
|
||||
@@ -91,7 +91,7 @@ AC_DEFUN([NL_ENABLE_COVERAGE],
|
||||
|
||||
else
|
||||
NL_COVERAGE_CPPFLAGS="--coverage"
|
||||
NL_COVERAGE_LDFLAGS="-lgcov"
|
||||
NL_COVERAGE_LIBS="-lgcov"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
+21
-15
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015-2016 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2015-2018 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,12 +17,13 @@
|
||||
#
|
||||
# Description:
|
||||
# This file defines GNU autoconf M4-style macros that ensure the
|
||||
# -Werror compiler option for GCC-based or -compatible compilers
|
||||
# do not break some autoconf tests (see
|
||||
# -Werror (or -Werror=<...>) compiler option(s) for GCC-based or
|
||||
# -compatible compilers do not break some autoconf tests (see
|
||||
# http://lists.gnu.org/archive/html/autoconf-patches/2008-09/msg00014.html).
|
||||
#
|
||||
# If -Werror has been passed transform it into -Wno-error for
|
||||
# CPPFLAGS, CFLAGS, CXXFLAGS, OBJCFLAGS, and OBJCXXFLAGS with
|
||||
# If -Werror (or -Werror=<...>) has/have been passed transform it
|
||||
# into -Wno-error (or -Wno-error=<...>) for CPPFLAGS, CFLAGS,
|
||||
# CXXFLAGS, OBJCFLAGS, and OBJCXXFLAGS with
|
||||
# NL_SAVE_WERROR. Transform them back again with
|
||||
# NL_RESTORE_WERROR.
|
||||
#
|
||||
@@ -31,17 +32,19 @@
|
||||
# _NL_SAVE_WERROR_FOR_VAR(variable)
|
||||
#
|
||||
# variable - The compiler flags variable to scan for the presence of
|
||||
# -Werror and, if present, transform to -Wno-error.
|
||||
# -Werror (or -Werror=<...>) and, if present, transform
|
||||
# to -Wno-error (or -Wno-error=<...>).
|
||||
#
|
||||
# This transforms, for the specified compiler flags variable, -Werror
|
||||
# to -Wno-error, if it was it present. The original state may be
|
||||
# restored by invoking _NL_RESTORE_WERROR_FOR_VAR([variable]).
|
||||
# (or -Werror=<...>) to -Wno-error (or -Wno-error=<...>), if it was it
|
||||
# present. The original state may be restored by invoking
|
||||
# _NL_RESTORE_WERROR_FOR_VAR([variable]).
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
AC_DEFUN([_NL_SAVE_WERROR_FOR_VAR],
|
||||
[
|
||||
if echo "${$1}" | grep -q '\-Werror'; then
|
||||
$1="`echo ${$1} | sed -e 's,-Werror\([[[:space:]]]\),-Wno-error\1,g'`"
|
||||
$1="`echo ${$1} | sed -e 's,-Werror\(=[[[:alnum:]_-]]\+\)*\([[[:space:]]]\),-Wno-error\1\2,g'`"
|
||||
nl_had_$1_werror=yes
|
||||
else
|
||||
nl_had_$1_werror=no
|
||||
@@ -56,14 +59,15 @@ AC_DEFUN([_NL_SAVE_WERROR_FOR_VAR],
|
||||
# such.
|
||||
#
|
||||
# This restores, for the specified compiler flags variable, -Werror
|
||||
# from -Wno-error, if it was initially set as -Werror at the time
|
||||
# (or -Werror=<...>) from -Wno-error (or -Wno-error=<...>), if it was
|
||||
# initially set as -Werror (or -Werror=<...>) at the time
|
||||
# _NL_SAVE_WERROR_FOR_VAR([variable]) was invoked.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
AC_DEFUN([_NL_RESTORE_WERROR_FOR_VAR],
|
||||
[
|
||||
if test "${nl_had_$1_werror}" = "yes"; then
|
||||
$1="`echo ${$1} | sed -e 's,-Wno-error\([[[:space:]]]\),-Werror\1,g'`"
|
||||
$1="`echo ${$1} | sed -e 's,-Wno-error\(=[[[:alnum:]_-]]\+\)*\([[[:space:]]]\),-Werror\1\2,g'`"
|
||||
fi
|
||||
|
||||
unset nl_had_$1_werror
|
||||
@@ -73,8 +77,9 @@ AC_DEFUN([_NL_RESTORE_WERROR_FOR_VAR],
|
||||
# NL_SAVE_WERROR
|
||||
#
|
||||
# This transforms, for each of CFLAGS, CXXFLAGS, OBJCFLAGS, and
|
||||
# OBJCXXFLAGS, -Werror to -Wno-error, if it was it present. The
|
||||
# original state may be restored by invoking NL_RESTORE_WERROR.
|
||||
# OBJCXXFLAGS, -Werror (or -Werror=<...>) to -Wno-error (or
|
||||
# -Wno-error=<...>), if it was it present. The original state may be
|
||||
# restored by invoking NL_RESTORE_WERROR.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
AC_DEFUN([NL_SAVE_WERROR],
|
||||
@@ -90,8 +95,9 @@ AC_DEFUN([NL_SAVE_WERROR],
|
||||
# NL_RESTORE_WERROR
|
||||
#
|
||||
# This restores, for each of OBJCXXFLAGS, OBJCFLAGS, CXXFLAGS, and
|
||||
# CFLAGS, -Werror from -Wno-error, if it was initially set as -Werror
|
||||
# at the time NL_SAVE_WERROR was invoked.
|
||||
# CFLAGS, -Werror (or -Werror=<...>) from -Wno-error (or
|
||||
# -Wno-error=<...>), if it was initially set as -Werror (or
|
||||
# -Werror=<...>) at the time NL_SAVE_WERROR was invoked.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
AC_DEFUN([NL_RESTORE_WERROR],
|
||||
|
||||
@@ -90,7 +90,7 @@ if @PACKAGE_SHORT_UPPER@_BUILD_COVERAGE_REPORTS
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE):
|
||||
$(call create-directory)
|
||||
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO): check | $(dir $(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO))
|
||||
$(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO): check | $(@PACKAGE_SHORT_UPPER@_COVERAGE_BUNDLE)
|
||||
$(call generate-coverage-report,${top_builddir})
|
||||
|
||||
coverage: $(@PACKAGE_SHORT_UPPER@_COVERAGE_INFO)
|
||||
|
||||
+9
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2016 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2018 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,11 +17,18 @@
|
||||
#
|
||||
# Description:
|
||||
# This file is the GNU automake template for the @PACKAGE_DESCRIPTION@
|
||||
# first-party (e.g. Nest Labs) software directory.
|
||||
# third-party software directory.
|
||||
#
|
||||
|
||||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am
|
||||
|
||||
# Always package (e.g. for 'make dist') these subdirectories.
|
||||
|
||||
DIST_SUBDIRS = \
|
||||
$(NULL)
|
||||
|
||||
# Always build (e.g. for 'make all') these subdirectories.
|
||||
|
||||
SUBDIRS = \
|
||||
$(NULL)
|
||||
|
||||
@@ -72,9 +72,9 @@ VERSION_FILE := $(if $(wildcard $(builddir)/.local-version)
|
||||
|
||||
#
|
||||
# Override autotool's default notion of the package version variables.
|
||||
# This ensures that when we create a source distribution that the
|
||||
# version is always the current version, not the version when the
|
||||
# package was bootstrapped.
|
||||
# This ensures that when we create a source distribution the
|
||||
# version is always the current version, not the package bootstrap
|
||||
# version.
|
||||
#
|
||||
|
||||
@PACKAGE_SHORT_UPPER@_VERSION ?= $(shell cat $(VERSION_FILE) 2> /dev/null)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
#
|
||||
# Copyright 2016 Nest Labs Inc. All Rights Reserved.
|
||||
# Copyright 2016-2017 Nest Labs Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -68,12 +68,12 @@ AC_CONFIG_SRCDIR([include/@PACKAGE_SHORT_LOWER@.h])
|
||||
# Tell autoconf where to find auxilliary build tools (e.g. config.guess,
|
||||
# install-sh, missing, etc.)
|
||||
#
|
||||
AC_CONFIG_AUX_DIR([@NLBUILD_AUTOTOOLS_STEM@/autoconf])
|
||||
AC_CONFIG_AUX_DIR([@NLBUILD_AUTOTOOLS_STEM@/third_party/autoconf])
|
||||
|
||||
#
|
||||
# Tell autoconf where to find auxilliary M4 macros
|
||||
#
|
||||
AC_CONFIG_MACRO_DIR([@NLBUILD_AUTOTOOLS_STEM@/autoconf/m4])
|
||||
AC_CONFIG_MACRO_DIRS([@NLBUILD_AUTOTOOLS_STEM@/third_party/autoconf/m4 @NLBUILD_AUTOTOOLS_STEM@/autoconf/m4])
|
||||
|
||||
#
|
||||
# Tell autoconf what file the package is using to aggregate C preprocessor
|
||||
@@ -303,10 +303,10 @@ if test "${ac_no_link}" != "yes"; then
|
||||
AC_CHECK_FUNCS([memcpy])
|
||||
fi
|
||||
|
||||
# Add any code coverage CPPFLAGS and LDFLAGS
|
||||
# Add any code coverage CPPFLAGS and LIBS
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${NL_COVERAGE_CPPFLAGS}"
|
||||
LDFLAGS="${LDFLAGS} ${NL_COVERAGE_LDFLAGS}"
|
||||
LIBS="${LIBS} ${NL_COVERAGE_LIBS}"
|
||||
|
||||
# At this point, we can restore the compiler flags to whatever the
|
||||
# user passed in, now that we're clear of an -Werror issues by
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ abs_top_hostdir="${nlbuild_autotools_dir}/tools/host"
|
||||
# any trailing version number information typically included on Darwin
|
||||
# / Mac OS X.
|
||||
|
||||
host=`${nlbuild_autotools_dir}/autoconf/config.guess | sed -e 's/[[:digit:].]*$//g'`
|
||||
host=`${nlbuild_autotools_dir}/third_party/autoconf/config.guess | sed -e 's/[[:digit:].]*$//g'`
|
||||
|
||||
# If possible, attempt to be self-sufficient, relying on GNU autotools
|
||||
# executables installed along with the SDK itself.
|
||||
|
||||
+36
-33
@@ -44,59 +44,62 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 10
|
||||
#serial 11.1
|
||||
# This version of the script has a local patch that has not yet been upstreamed.
|
||||
|
||||
AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
|
||||
AC_DEFUN([AX_JNI_INCLUDE_DIR],[
|
||||
|
||||
JNI_INCLUDE_DIRS=""
|
||||
|
||||
# if JAVA_HOME is set, always use that.
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
_JTOPDIR="$JAVA_HOME"
|
||||
_JTOPDIR="$JAVA_HOME"
|
||||
else
|
||||
if test "x$JAVAC" = x; then
|
||||
JAVAC=javac
|
||||
fi
|
||||
AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
|
||||
if test "x$_ACJNI_JAVAC" = xno; then
|
||||
AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
|
||||
fi
|
||||
_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
|
||||
_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
# on OS X, use the java_home command to find the user's prefered JVM.
|
||||
_JTOPDIR=`/usr/libexec/java_home`
|
||||
;;
|
||||
*)
|
||||
# otherwise, attempt to infer the JDK directory from the location of the
|
||||
# javac command.
|
||||
if test "x$JAVAC" = x; then
|
||||
JAVAC=javac
|
||||
fi
|
||||
AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
|
||||
if test "x$_ACJNI_JAVAC" = xno; then
|
||||
AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
|
||||
fi
|
||||
_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
|
||||
_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::' -e 's:/[[^/]]*$::'`
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
|
||||
_JINC="$_JTOPDIR/Headers";;
|
||||
*) _JINC="$_JTOPDIR/include";;
|
||||
esac
|
||||
# always include the main JDK include directory. this is where jni.h should be located.
|
||||
_JINC="$_JTOPDIR/include"
|
||||
|
||||
_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
|
||||
_AS_ECHO_LOG([_JINC=$_JINC])
|
||||
|
||||
# On Mac OS X 10.6.4, jni.h is a symlink:
|
||||
# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
|
||||
# -> ../../CurrentJDK/Headers/jni.h.
|
||||
#
|
||||
# Override AC_CHECK_FILE with our own AX_CHECK_FILE to fix
|
||||
# cross-compilation issues.
|
||||
# verify that jni.h can be found.
|
||||
if test -f "$_JINC/jni.h"; then
|
||||
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
|
||||
else
|
||||
AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
|
||||
fi
|
||||
|
||||
AX_CHECK_FILE([$_JINC/jni.h],
|
||||
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"],
|
||||
[_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
|
||||
AX_CHECK_FILE([$_JTOPDIR/include/jni.h],
|
||||
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"],
|
||||
AC_MSG_ERROR([cannot find JDK header files]))
|
||||
])
|
||||
|
||||
# get the likely subdirectories for system specific java includes
|
||||
# get the likely subdirectories for system specific java includes (e.g. jni_md.h).
|
||||
case "$host_os" in
|
||||
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
|
||||
freebsd*) _JNI_INC_SUBDIRS="freebsd";;
|
||||
darwin*) _JNI_INC_SUBDIRS="darwin";;
|
||||
linux*) _JNI_INC_SUBDIRS="linux genunix";;
|
||||
osf*) _JNI_INC_SUBDIRS="alpha";;
|
||||
solaris*) _JNI_INC_SUBDIRS="solaris";;
|
||||
mingw*) _JNI_INC_SUBDIRS="win32";;
|
||||
cygwin*) _JNI_INC_SUBDIRS="win32";;
|
||||
mingw*) _JNI_INC_SUBDIRS="win32";;
|
||||
cygwin*) _JNI_INC_SUBDIRS="win32";;
|
||||
*) _JNI_INC_SUBDIRS="genunix";;
|
||||
esac
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ abs_top_srcdir := $(abspath $(top_srcdir))
|
||||
# any trailing version number information typically included on Darwin
|
||||
# / Mac OS X.
|
||||
|
||||
host := $(shell $(top_srcdir)/autoconf/config.guess | $(SED) -e 's/[[:digit:].]*$$//g')
|
||||
host := $(shell $(top_srcdir)/third_party/autoconf/config.guess | $(SED) -e 's/[[:digit:].]*$$//g')
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
@@ -62,8 +62,8 @@ PACKAGE_VERSION = $(shell $(CAT) $(top_builddir)/.local-version)
|
||||
|
||||
VERSION = $(PACKAGE_VERSION)
|
||||
|
||||
DIST_TMPDIR := $(shell mktemp -u -p /tmp -d tmp.$(PACKAGE)-$(VERSION)XXXXXX)
|
||||
TOOLS_TMPDIR := $(shell mktemp -u -p /tmp -d tmp.$(PACKAGE)-$(VERSION)XXXXXX)
|
||||
DIST_TMPDIR := $(shell mktemp -u -d /tmp/tmp.$(PACKAGE)-$(VERSION)XXXXXX)
|
||||
TOOLS_TMPDIR := $(shell mktemp -u -d /tmp/tmp.$(PACKAGE)-$(VERSION)XXXXXX)
|
||||
|
||||
#
|
||||
# Verbosity
|
||||
|
||||
+39
-29
@@ -49,7 +49,7 @@ usage() {
|
||||
|
||||
if [ $1 -ne 1 ]; then
|
||||
echo ""
|
||||
echo " --arch ARCH Build the package for ARCH host architecture."
|
||||
echo " --arch ARCH Build the package for ARCH host architecture."
|
||||
echo " -h, --help Print this help, then exit."
|
||||
echo " --builddir DIR Build the packages in DIR."
|
||||
echo " --destdir DIR Install the built tools to directory DIR."
|
||||
@@ -180,19 +180,29 @@ find_versioned_or_nonverioned_archive() {
|
||||
fetch_url_with_command() {
|
||||
local fetchdir="${1}"
|
||||
local url="${2}"
|
||||
local executable="`which ${3}`"
|
||||
local curdir="`pwd`"
|
||||
local status=1
|
||||
|
||||
shift 2
|
||||
|
||||
if [ -x "${executable}" ]; then
|
||||
cd "${fetchdir}"
|
||||
|
||||
verbose " `echo ${1} | tr '[[:lower:]]' '[[:upper:]]'` ${url}"
|
||||
|
||||
cd "${fetchdir}"
|
||||
${*} "${url}"
|
||||
|
||||
${*} "${url}"
|
||||
status=${?}
|
||||
|
||||
if [ ${?} -ne 0 ]; then
|
||||
error "Failed to fetch ${url} with ${1}."
|
||||
if [ ${?} -ne 0 ]; then
|
||||
error "Failed to fetch ${url} with ${1}."
|
||||
fi
|
||||
|
||||
cd "${curdir}"
|
||||
fi
|
||||
|
||||
cd "${curdir}"
|
||||
|
||||
return ${status}
|
||||
}
|
||||
|
||||
#
|
||||
@@ -288,7 +298,7 @@ build_package() {
|
||||
fi
|
||||
|
||||
if [ ! -d "${archivedir}/${fqpackage}" ]; then
|
||||
verbose " TAR ${archive}"
|
||||
verbose " TAR ${archive}"
|
||||
tar --directory "${archivedir}" -xf "${archive}" || exit ${?}
|
||||
fi
|
||||
|
||||
@@ -320,7 +330,7 @@ build_package() {
|
||||
export AC_MACRODIR="${destdir}/share/autoconf"
|
||||
|
||||
export autom4te_perllibdir="${destdir}/share/autoconf"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "${destdir}/share/automake-1.14" ]; then
|
||||
export PERL5LIB="${destdir}/share/automake-1.14:${PERL5LIB}"
|
||||
@@ -388,43 +398,43 @@ build_package() {
|
||||
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case ${1} in
|
||||
--arch)
|
||||
--arch)
|
||||
ARCH=${2}
|
||||
shift 2
|
||||
;;
|
||||
|
||||
-h|--help)
|
||||
usage 0
|
||||
;;
|
||||
-h|--help)
|
||||
usage 0
|
||||
;;
|
||||
|
||||
--builddir)
|
||||
BUILDDIR=${2}
|
||||
shift 2
|
||||
;;
|
||||
--builddir)
|
||||
BUILDDIR=${2}
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--destdir)
|
||||
DESTDIR=${2}
|
||||
shift 2
|
||||
;;
|
||||
--destdir)
|
||||
DESTDIR=${2}
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--srcdir)
|
||||
SRCDIR=${2}
|
||||
shift 2
|
||||
;;
|
||||
;;
|
||||
|
||||
-v|--verbose)
|
||||
$((VERBOSE++))
|
||||
shift 1
|
||||
;;
|
||||
;;
|
||||
|
||||
--)
|
||||
shift 1
|
||||
break
|
||||
;;
|
||||
--)
|
||||
shift 1
|
||||
break
|
||||
;;
|
||||
|
||||
*)
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user