Get rid of sub{lib,doc}dir

They don't make sense - using same ct-ng won't work with different versions,
so they cannot coexist in the same prefix.

Also localize other configure variables so that their usage is easier to track.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2017-10-05 00:09:22 -07:00
parent 1ce2eab963
commit d401afbdda
4 changed files with 28 additions and 24 deletions

View File

@ -57,11 +57,11 @@ export PACKAGE_TARNAME := @PACKAGE_TARNAME@
export VERSION := @PACKAGE_VERSION@
export prefix := @prefix@
export exec_prefix := @exec_prefix@
export bindir := @bindir@
export libdir := @libdir@@sublibdir@
export docdir := @docdir@@subdocdir@
export mandir := @mandir@
export datarootdir := @datarootdir@
export bindir := @bindir@
export libdir := @libdir@
export docdir := @docdir@
export mandir := @mandir@
export install := @INSTALL@
export bash := @BASH_SHELL@
export awk := @AWK@
@ -77,16 +77,6 @@ export objdump := @OBJDUMP@
export readelf := @READELF@
export patch := @PATCH@
export gperf := @GPERF@
export gperf_len_type := @GPERF_LEN_TYPE@
export CC := @CC@
export CPP := @CPP@
export CPPFLAGS := @CPPFLAGS@
export CFLAGS := @CFLAGS@
export LDFLAGS := @LDFLAGS@
export LIBS := @LIBS@
export INTL_LIBS := @INTL_LIBS@
export curses_hdr := @ac_ct_curses_hdr@
export gettext := @gettext@
export CPU_COUNT := @CPU_COUNT@
###############################################################################

View File

@ -301,9 +301,11 @@ AS_IF(
[test -f version.sh -a -x version.sh],
[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
AC_SUBST([sublibdir])
AC_SUBST([subdocdir])
AS_IF(
[test "x$enable_local" = "xyes"],
[AC_MSG_NOTICE([overiding all of --prefix and the likes, because --enable-local was set])
@ -311,13 +313,9 @@ AS_IF(
exec_prefix="$prefix"
bindir="$prefix"
libdir="$prefix"
sublibdir=""
docdir="$prefix""/docs"
subdocdir=""
datarootdir="$prefix"
mandir="$docdir"],
[sublibdir="/\${VERSION}"
subdocdir="/\${VERSION}"])
mandir="$docdir"])
AC_CONFIG_FILES([
Makefile

View File

@ -90,7 +90,11 @@ help-distrib::
help-env::
@echo
@echo 'Environment variables (see @@CT_DOCDIR@@/0 - Table of content.txt):'
@if [ -r "@@CT_DOCDIR@@/manual/4_Building.md" ]; then \
echo 'Environment variables (see @@CT_DOCDIR@@/0 - Table of content.txt):'; \
else \
echo 'Environment variables (see http://crosstool-ng.github.io/docs/build/)'; \
fi
help-tail::
@echo

View File

@ -2,6 +2,18 @@
# Hmmm! Cheesy build!
# Or: where I can unveil my make-fu... :-]
install = @INSTALL@
sed = @SED@
gperf = @GPERF@
gperf_len_type = @GPERF_LEN_TYPE@
gettext = @gettext@
curses_hdr = @ac_ct_curses_hdr@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INTL_LIBS = @INTL_LIBS@
__silent = $(if $(V),,@printf ' %-7s %s\n' '$1' '$(if $2,$2,$(strip $<))' && )
__silent_rm = $(call __silent,RM,$1)rm -f $1
@ -103,10 +115,10 @@ conf: $(COMMON_OBJ) $(conf_OBJ)
install: $(patsubst %,install-%,$(PROGS)) install-kconfig.mk
$(patsubst %,install-%,$(PROGS)): install-%: %
$(call __silent,INSTALL,$<)install -m 0755 $< $(DESTDIR)/$<
$(call __silent,INSTALL,$<)$(install) -m 0755 $< $(DESTDIR)/$<
install-kconfig.mk: kconfig.mk
$(call __silent,INSTALL,$<)install -m 0644 $< $(DESTDIR)/$<
$(call __silent,INSTALL,$<)$(install) -m 0644 $< $(DESTDIR)/$<
#-----------------------------------------------------------
# Cleaning up the mess...