Use the paths found by ./configure in the ct-ng.in makefile script and its fragments.

/trunk/kconfig/kconfig.mk |    2     1     1     0 +-
 /trunk/samples/samples.mk |   18     9     9     0 +++++++++---------
 /trunk/config/config.mk   |   10     5     5     0 +++++-----
 /trunk/ct-ng.in           |   22    13     9     0 +++++++++++++---------
 4 files changed, 28 insertions(+), 24 deletions(-)
This commit is contained in:
Yann E. MORIN" 2009-01-26 18:36:02 +00:00
parent 44596c425f
commit c7a1e6a4da
4 changed files with 28 additions and 24 deletions

View File

@ -84,11 +84,11 @@ define build_gen_choice_in
echo ""; \
for entry in $(5); do \
file="$(4)/$${entry}.in"; \
_entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
_entry=$$(echo "$${entry}" |$(sed) -r -s -e 's/[-.+]/_/g;'); \
echo "config $(3)_$${_entry}"; \
echo " bool"; \
printf " prompt \"$${entry}"; \
if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
if $(grep) -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
echo " (EXPERIMENTAL)\""; \
echo " depends on EXPERIMENTAL"; \
else \
@ -99,7 +99,7 @@ define build_gen_choice_in
echo "endchoice"; \
for entry in $(5); do \
file="$(4)/$${entry}.in"; \
_entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
_entry=$$(echo "$${entry}" |$(sed) -r -s -e 's/[-.+]/_/g;'); \
echo ""; \
echo "if $(3)_$${_entry}"; \
echo "config $(3)"; \
@ -127,11 +127,11 @@ define build_gen_menu_in
echo ""; \
for entry in $(5); do \
file="$(4)/$${entry}.in"; \
_entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \
_entry=$$(echo "$${entry}" |$(sed) -r -s -e 's/[-.+]/_/g;'); \
echo "menuconfig $(3)_$${_entry}"; \
echo " bool"; \
printf " prompt \"$${entry}"; \
if grep -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
if $(grep) -E '^# +EXPERIMENTAL$$' $${file} >/dev/null 2>&1; then \
echo " (EXPERIMENTAL)\""; \
echo " depends on EXPERIMENTAL"; \
else \

View File

@ -6,12 +6,8 @@
# Don't use built-in rules, we know what we're doing
MAKEFLAGS += --no-print-directory --no-builtin-rules
# Some distributions (eg. Ubuntu) thought it wise to point /bin/sh to
# a truly POSIX-conforming shell, ash in this case. This is not so good
# as we, smart (haha!) developers (as smart we ourselves think we are),
# got used to bashisms, and are enclined to easiness... So force use of
# bash. (Note: this is ugly, but ./configure checks for it).
export SHELL=/bin/bash
# Don't go parallel
.NOTPARALLEL:
# This is where ct-ng is:
export CT_NG:=$(lastword $(MAKEFILE_LIST))
@ -26,9 +22,17 @@ export CT_DOC_DIR:=@@CT_DOCDIR@@
# This is crosstool-NG version string
export CT_VERSION:=@@CT_VERSION@@
# Don't go parallel
.NOTPARALLEL:
# Paths found by ./configure
include $(CT_LIB_DIR)/paths.mk
# Some distributions (eg. Ubuntu) thought it wise to point /bin/sh to
# a truly POSIX-conforming shell, ash in this case. This is not so good
# as we, smart (haha!) developers (as smart we ourselves think we are),
# got used to bashisms, and are enclined to easiness... So force use of
# bash.
export SHELL=$(bash)
# Make the restart/stop steps availabe to scripts/crostool-NG.sh
export CT_STOP:=$(STOP)
export CT_RESTART:=$(RESTART)
@ -123,7 +127,7 @@ build: .config
$(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh
build.%:
$(SILENT)$(MAKE) -rf $(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
$(SILENT)$(MAKE) -rf $(CT_NG) $(shell echo "$(@)" |$(sed) -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
PHONY += tarball
#tarball:

View File

@ -131,7 +131,7 @@ endef
%.dep: %.c $(CT_LIB_DIR)/kconfig/kconfig.mk
$(check_kconfig_dir)
@$(ECHO) " DEP $@"
$(SILENT)$(HOST_CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |sed -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@
$(SILENT)$(HOST_CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@
# Build C files
%.o: %.c $(CT_LIB_DIR)/kconfig/kconfig.mk

View File

@ -39,7 +39,7 @@ $(patsubst %,show-%,$(CT_SAMPLES)):
# print the list of all available samples
PHONY += list-samples
list-samples: .FORCE
@echo $(CT_SAMPLES) |sed -r -e 's/ /\n/g;' |sort
@echo $(CT_SAMPLES) |$(sed) -r -e 's/ /\n/g;' |sort
wiki-samples:
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
@ -76,7 +76,7 @@ $(CT_SAMPLES):
echo ; \
echo '***********************************************************'; \
)
$(SILENT)if grep -E '^CT_EXPERIMENTAL=y$$' .config >/dev/null 2>&1; then \
$(SILENT)if $(grep) -E '^CT_EXPERIMENTAL=y$$' .config >/dev/null 2>&1; then \
echo ; \
echo 'WARNING! This sample may enable experimental features.'; \
echo ' Please be sure to review the configuration prior'; \
@ -97,12 +97,12 @@ $(CT_SAMPLES):
define build_sample
@$(ECHO) ' CONF $(1)'
$(SILENT)cp $(call sample_dir,$(1))/crosstool.config .config
$(SILENT)sed -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(2)":;' .config
$(SILENT)sed -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config
$(SILENT)sed -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config
$(SILENT)sed -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config
$(SILENT)sed -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config
$(SILENT)sed -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config
$(SILENT)$(sed) -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$(2)":;' .config
$(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config
$(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config
$(SILENT)$(sed) -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config
$(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config
$(SILENT)$(sed) -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config
$(SILENT)$(MAKE) -rf $(CT_NG) V=0 oldconfig
@$(ECHO) ' BUILD $(1)'
$(SILENT)$(MAKE) -rf $(CT_NG) V=0 build
@ -131,5 +131,5 @@ build-all: $(patsubst %,build-%,$(CT_SAMPLES))
# Build all samples, overiding the number of // jobs per sample
build-all.%:
$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
$(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) $(shell echo "$(@)" |$(sed) -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')