mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-29 17:18:53 +00:00
Cannot ignore 'make install' with automake
Automake does not allow us to place the hooks before its generated actions, and does not allow us to check MAKECMDGOALS, and does not support a mechanism for disabling make install (such as noinst_SUBDIRS, requested a few times on automake mailing list). The only way I could preserve the current behavior is to have a GNUmakefile wrapper that will convert MAKECMDGOAL into a variable unknown to automake - which seems too convoluted a solution for the problem being solved. Hence the approach is to not override anything for --enable-local. It is now fully handled by selecting different values for CT_xxx_DIR in ct-ng.in; but at the build-system level, all the variables remain the same. We just don't support 'make install' in that case anymore; but the ct-ng in the working copy can be used after a regular 'make' (or 'make all'). Help message for --enable-local updated accordingly. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
f45e29c5ca
commit
355f6f03fb
@ -16,7 +16,6 @@ do_subst = ( @SED@ \
|
|||||||
-e 's,[@]docdir[@],$(docdir),g' \
|
-e 's,[@]docdir[@],$(docdir),g' \
|
||||||
-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
|
-e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
|
||||||
-e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \
|
-e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \
|
||||||
-e 's,[@]enable_local[@],$(enable_local),g' \
|
|
||||||
| $(SHELL) config.status --file=- )
|
| $(SHELL) config.status --file=- )
|
||||||
|
|
||||||
ct-ng: ct-ng.in Makefile
|
ct-ng: ct-ng.in Makefile
|
||||||
|
18
configure.ac
18
configure.ac
@ -27,7 +27,7 @@ AC_ARG_ENABLE(
|
|||||||
[local],
|
[local],
|
||||||
[AS_HELP_STRING(
|
[AS_HELP_STRING(
|
||||||
[--enable-local],
|
[--enable-local],
|
||||||
[do not install, and use current directory])])
|
[run ct-ng from the current directory; 'make install' unsupported])])
|
||||||
AC_SUBST([enable_local], [${enable_local:-no}])
|
AC_SUBST([enable_local], [${enable_local:-no}])
|
||||||
|
|
||||||
# FIXME: I don't know why we have this. Will remove after the 1.24 release.
|
# FIXME: I don't know why we have this. Will remove after the 1.24 release.
|
||||||
@ -279,22 +279,6 @@ AS_IF(
|
|||||||
[test -f version.sh -a -x version.sh],
|
[test -f version.sh -a -x version.sh],
|
||||||
[PACKAGE_VERSION=$(./version.sh "${PACKAGE_VERSION}")])
|
[PACKAGE_VERSION=$(./version.sh "${PACKAGE_VERSION}")])
|
||||||
|
|
||||||
# We are not installing dynamic libraries that need to be found by dynamic linker.
|
|
||||||
# Install into a subdirectory.
|
|
||||||
libdir=${libdir}/${PACKAGE_TARNAME}
|
|
||||||
|
|
||||||
# Handle the local case
|
|
||||||
AS_IF(
|
|
||||||
[test "x$enable_local" = "xyes"],
|
|
||||||
[AC_MSG_NOTICE([overiding all of --prefix and the likes, because --enable-local was set])
|
|
||||||
prefix=$(pwd)
|
|
||||||
exec_prefix="$prefix"
|
|
||||||
bindir="$prefix"
|
|
||||||
docdir="$prefix""/docs"
|
|
||||||
pkgdatadir="$prefix"
|
|
||||||
pkglibexecdir="$prefix/kconfig"
|
|
||||||
mandir="$docdir"])
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
paths.sh
|
paths.sh
|
||||||
|
7
ct-ng.in
7
ct-ng.in
@ -14,18 +14,19 @@ export CT_NG:=$(abspath $(lastword $(MAKEFILE_LIST)))
|
|||||||
# and this is where we're working in:
|
# and this is where we're working in:
|
||||||
export CT_TOP_DIR:=$(shell pwd)
|
export CT_TOP_DIR:=$(shell pwd)
|
||||||
|
|
||||||
# Paths and values set by ./configure
|
|
||||||
# Don't bother to change it other than with a new ./configure!
|
|
||||||
ifeq (@enable_local@,yes)
|
ifeq (@enable_local@,yes)
|
||||||
# automake does not allow to set pkgxxxdir, they are always derived from
|
# automake does not allow to set pkgxxxdir, they are always derived from
|
||||||
# a respective xxxdir. So, for enable-local case, set them directly here.
|
# a respective xxxdir. So, for enable-local case, set them directly here.
|
||||||
export CT_LIB_DIR:=$(CT_TOP_DIR)
|
export CT_LIB_DIR:=$(CT_TOP_DIR)
|
||||||
export CT_LIBEXEC_DIR:=$(CT_TOP_DIR)/kconfig
|
export CT_LIBEXEC_DIR:=$(CT_TOP_DIR)/kconfig
|
||||||
|
export CT_DOC_DIR:=$(CT_TOP_DIR)/docs
|
||||||
else
|
else
|
||||||
|
# Paths and values set by ./configure
|
||||||
|
# Don't bother to change it other than with a new ./configure!
|
||||||
export CT_LIB_DIR:=@pkgdatadir@
|
export CT_LIB_DIR:=@pkgdatadir@
|
||||||
export CT_LIBEXEC_DIR:=@pkglibexecdir@
|
export CT_LIBEXEC_DIR:=@pkglibexecdir@
|
||||||
endif
|
|
||||||
export CT_DOC_DIR:=@docdir@
|
export CT_DOC_DIR:=@docdir@
|
||||||
|
endif
|
||||||
|
|
||||||
# This is crosstool-NG version string
|
# This is crosstool-NG version string
|
||||||
export CT_VERSION:=@PACKAGE_VERSION@
|
export CT_VERSION:=@PACKAGE_VERSION@
|
||||||
|
Loading…
Reference in New Issue
Block a user