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 ""; \ echo ""; \
for entry in $(5); do \ for entry in $(5); do \
file="$(4)/$${entry}.in"; \ 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 "config $(3)_$${_entry}"; \
echo " bool"; \ echo " bool"; \
printf " prompt \"$${entry}"; \ 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 " (EXPERIMENTAL)\""; \
echo " depends on EXPERIMENTAL"; \ echo " depends on EXPERIMENTAL"; \
else \ else \
@ -99,7 +99,7 @@ define build_gen_choice_in
echo "endchoice"; \ echo "endchoice"; \
for entry in $(5); do \ for entry in $(5); do \
file="$(4)/$${entry}.in"; \ file="$(4)/$${entry}.in"; \
_entry=$$(echo "$${entry}" |sed -r -s -e 's/[-.+]/_/g;'); \ _entry=$$(echo "$${entry}" |$(sed) -r -s -e 's/[-.+]/_/g;'); \
echo ""; \ echo ""; \
echo "if $(3)_$${_entry}"; \ echo "if $(3)_$${_entry}"; \
echo "config $(3)"; \ echo "config $(3)"; \
@ -127,11 +127,11 @@ define build_gen_menu_in
echo ""; \ echo ""; \
for entry in $(5); do \ for entry in $(5); do \
file="$(4)/$${entry}.in"; \ 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 "menuconfig $(3)_$${_entry}"; \
echo " bool"; \ echo " bool"; \
printf " prompt \"$${entry}"; \ 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 " (EXPERIMENTAL)\""; \
echo " depends on EXPERIMENTAL"; \ echo " depends on EXPERIMENTAL"; \
else \ else \

View File

@ -6,12 +6,8 @@
# Don't use built-in rules, we know what we're doing # Don't use built-in rules, we know what we're doing
MAKEFLAGS += --no-print-directory --no-builtin-rules MAKEFLAGS += --no-print-directory --no-builtin-rules
# Some distributions (eg. Ubuntu) thought it wise to point /bin/sh to # Don't go parallel
# a truly POSIX-conforming shell, ash in this case. This is not so good .NOTPARALLEL:
# 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
# This is where ct-ng is: # This is where ct-ng is:
export CT_NG:=$(lastword $(MAKEFILE_LIST)) export CT_NG:=$(lastword $(MAKEFILE_LIST))
@ -26,9 +22,17 @@ export CT_DOC_DIR:=@@CT_DOCDIR@@
# This is crosstool-NG version string # This is crosstool-NG version string
export CT_VERSION:=@@CT_VERSION@@ export CT_VERSION:=@@CT_VERSION@@
# Don't go parallel # Paths found by ./configure
.NOTPARALLEL: 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_STOP:=$(STOP)
export CT_RESTART:=$(RESTART) export CT_RESTART:=$(RESTART)
@ -123,7 +127,7 @@ build: .config
$(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh $(SILENT)$(CT_LIB_DIR)/scripts/crosstool-NG.sh
build.%: 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 PHONY += tarball
#tarball: #tarball:

View File

@ -131,7 +131,7 @@ endef
%.dep: %.c $(CT_LIB_DIR)/kconfig/kconfig.mk %.dep: %.c $(CT_LIB_DIR)/kconfig/kconfig.mk
$(check_kconfig_dir) $(check_kconfig_dir)
@$(ECHO) " DEP $@" @$(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 # Build C files
%.o: %.c $(CT_LIB_DIR)/kconfig/kconfig.mk %.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 # print the list of all available samples
PHONY += list-samples PHONY += list-samples
list-samples: .FORCE 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: wiki-samples:
$(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES) $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(CT_SAMPLES)
@ -76,7 +76,7 @@ $(CT_SAMPLES):
echo ; \ echo ; \
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 ; \
echo 'WARNING! This sample may enable experimental features.'; \ echo 'WARNING! This sample may enable experimental features.'; \
echo ' Please be sure to review the configuration prior'; \ echo ' Please be sure to review the configuration prior'; \
@ -97,12 +97,12 @@ $(CT_SAMPLES):
define build_sample define build_sample
@$(ECHO) ' CONF $(1)' @$(ECHO) ' CONF $(1)'
$(SILENT)cp $(call sample_dir,$(1))/crosstool.config .config $(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_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_(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_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_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_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_LOG_PROGRESS_BAR).*$$:\1=y:;' .config
$(SILENT)$(MAKE) -rf $(CT_NG) V=0 oldconfig $(SILENT)$(MAKE) -rf $(CT_NG) V=0 oldconfig
@$(ECHO) ' BUILD $(1)' @$(ECHO) ' BUILD $(1)'
$(SILENT)$(MAKE) -rf $(CT_NG) V=0 build $(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 samples, overiding the number of // jobs per sample
build-all.%: 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|;')