Skip to content

Commit

Permalink
Get rid of sub{lib,doc}dir
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stilor committed Apr 7, 2018
1 parent 1ce2eab commit d401afb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
16 changes: 3 additions & 13 deletions Makefile.in
Expand Up @@ -57,11 +57,11 @@ export PACKAGE_TARNAME := @PACKAGE_TARNAME@
export VERSION := @PACKAGE_VERSION@
export prefix := @prefix@
export exec_prefix := @exec_prefix@
export datarootdir := @datarootdir@
export bindir := @bindir@
export libdir := @libdir@@sublibdir@
export docdir := @docdir@@subdocdir@
export libdir := @libdir@
export docdir := @docdir@
export mandir := @mandir@
export datarootdir := @datarootdir@
export install := @INSTALL@
export bash := @BASH_SHELL@
export awk := @AWK@
Expand All @@ -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@

###############################################################################
Expand Down
12 changes: 5 additions & 7 deletions configure.ac
Expand Up @@ -301,23 +301,21 @@ 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])
prefix=$(pwd)
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
Expand Down
6 changes: 5 additions & 1 deletion ct-ng.in
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions kconfig/Makefile.in
Expand Up @@ -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

Expand Down Expand Up @@ -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...
Expand Down

0 comments on commit d401afb

Please sign in to comment.