From e9916d58e93c921b099170b4b5ffcd954b7da818 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 15 Jul 2007 09:09:04 +0000 Subject: Rename all Makefiles used by ct-ng into (something).mk, to avoid confusion. diff --git a/Makefile.in b/Makefile.in index 840a382..70541f3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,7 +80,7 @@ install-lib-main: $(LIBDIR) tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \ done @rm -f $(LIBDIR)/tools/addToolVersion.sh - @for src_file in Makefile.steps version; do \ + @for src_file in steps.mk version; do \ echo " INST $${src_file}"; \ install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \ done diff --git a/Makefile.steps b/Makefile.steps deleted file mode 100644 index a89a757..0000000 --- a/Makefile.steps +++ /dev/null @@ -1,35 +0,0 @@ -# Makefile for each steps -# Copyright 2006 Yann E. MORIN - -CT_STEPS := libc_check_config \ - kernel_check_config \ - kernel_headers \ - binutils \ - cc_core_pass_1 \ - libc_headers \ - libc_start_files \ - cc_core_pass_2 \ - libfloat \ - libc \ - cc \ - libc_finish \ - tools \ - debug \ - -$(CT_STEPS): - @$(CT_NG) RESTART=$@ STOP=$@ build - -$(patsubst %,-%,$(CT_STEPS)): - @$(CT_NG) STOP=$(patsubst -%,%,$@) build - -$(patsubst %,%-,$(CT_STEPS)): - @$(CT_NG) RESTART=$(patsubst %-,%,$@) build - -help-build:: - @echo ' liststeps - List all build steps' - -liststeps: - @echo 'Available build steps, in order:' - @for step in $(CT_STEPS); do \ - echo " - $${step}"; \ - done diff --git a/ct-ng.in b/ct-ng.in index a9f956f..6c8aa54 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -70,10 +70,10 @@ help-clean:: @echo ' clean - Remove generated files' @echo ' distclean - Remove generated files, configuration and build directories' -include $(CT_LIB_DIR)/kconfig/Makefile -include $(CT_LIB_DIR)/samples/Makefile -include $(CT_LIB_DIR)/tools/Makefile -include $(CT_LIB_DIR)/Makefile.steps +include $(CT_LIB_DIR)/kconfig/kconfig.mk +include $(CT_LIB_DIR)/samples/samples.mk +include $(CT_LIB_DIR)/tools/tools.mk +include $(CT_LIB_DIR)/steps.mk help-distrib:: @echo ' tarball - Build a tarball of the configured toolchain' diff --git a/kconfig/Makefile b/kconfig/Makefile deleted file mode 100644 index 4765374..0000000 --- a/kconfig/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# =========================================================================== -# crosstool-NG configuration targets -# These targets are used from top-level makefile - -# Derive the project version from, well, the project version: -export PROJECTVERSION=$(CT_VERSION) - -KCONFIG_TOP = config/config.in -obj = $(CT_TOP_DIR)/kconfig -PHONY += clean help oldconfig menuconfig config defoldconfig - -# Darwin (MacOS-X) does not have proper libintl support -ifeq ($(shell uname -s),Darwin) -KBUILD_NO_NLS:=1 -endif - -ifneq ($(KBUILD_NO_NLS),) -CFLAGS += -DKBUILD_NO_NLS -endif - -# Build a list of all config files -DEBUG_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config/debug -type f -name '*.in') -TOOLS_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config/tools -type f -name '*.in') - -STATIC_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config -type f -name '*.in') -GEN_CONFIG_FILES=$(CT_TOP_DIR)/config.gen/debug.in \ - $(CT_TOP_DIR)/config.gen/tools.in - -CONFIG_FILES=$(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES) - -$(GEN_CONFIG_FILES):: $(CT_TOP_DIR)/config.gen - -$(CT_TOP_DIR)/config.gen: - @mkdir -p $(CT_TOP_DIR)/config.gen - -$(CT_TOP_DIR)/config.gen/debug.in:: $(DEBUG_CONFIG_FILES) - @echo "# Debug facilities menu" >$@ - @echo "# Generated file, do not edit!!!" >>$@ - @echo "menu \"Debug facilities\"" >>$@ - @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/debug/*.in)); do \ - echo "source $${f}"; \ - done >>$@ - @echo "endmenu" >>$@ - -$(CT_TOP_DIR)/config.gen/tools.in:: $(TOOLS_CONFIG_FILES) - @echo "# Tools facilities menu" >$@ - @echo "# Generated file, do not edit!!!" >>$@ - @echo "menu \"Tools facilities\"" >>$@ - @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/tools/*.in)); do \ - echo "source $${f}"; \ - done >>$@ - @echo "endmenu" >>$@ - -config menuconfig oldconfig defoldconfig:: $(KCONFIG_TOP) - -$(KCONFIG_TOP): - @ln -s $(CT_LIB_DIR)/config config - -menuconfig:: $(obj)/mconf $(CONFIG_FILES) - @$< $(KCONFIG_TOP) - -config:: $(obj)/conf $(CONFIG_FILES) - @$< $(KCONFIG_TOP) - -oldconfig:: $(obj)/conf $(CONFIG_FILES) - @$< -s $(KCONFIG_TOP) - -defoldconfig:: $(obj)/conf $(CONFIG_FILES) - @yes "" |$< -s $(KCONFIG_TOP) >/dev/null - -# Help text used by make help -help-config:: - @echo ' config - Update current config using a line-oriented program' - @echo ' menuconfig - Update current config using a menu based program' - @echo ' oldconfig - Update current config using a provided .config as base' - -# Cheesy build - -SHIPPED = $(CT_LIB_DIR)/kconfig/zconf.tab.c $(CT_LIB_DIR)/kconfig/lex.zconf.c $(CT_LIB_DIR)/kconfig/zconf.hash.c - -%.c: %.c_shipped - @ln -s $(notdir $<) $@ - -$(obj)/conf $(obj)/mconf:: $(obj) - -$(obj): - @mkdir -p $(obj) - -$(obj)/mconf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/mconf.c - @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \ - -lcurses "-DCURSES_LOC=" - -$(obj)/conf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c - @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{conf.c,zconf.tab.c} - -clean:: - @rm -f $(CT_TOP_DIR)/kconfig/{,m}conf - @rmdir --ignore-fail-on-non-empty $(CT_TOP_DIR)/kconfig 2>/dev/null || true - @rm -f $(CT_TOP_DIR)/config - @rm -rf $(CT_TOP_DIR)/config.gen - -distclean:: - @rm -f $(CT_TOP_DIR)/config diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk new file mode 100644 index 0000000..4765374 --- /dev/null +++ b/kconfig/kconfig.mk @@ -0,0 +1,103 @@ +# =========================================================================== +# crosstool-NG configuration targets +# These targets are used from top-level makefile + +# Derive the project version from, well, the project version: +export PROJECTVERSION=$(CT_VERSION) + +KCONFIG_TOP = config/config.in +obj = $(CT_TOP_DIR)/kconfig +PHONY += clean help oldconfig menuconfig config defoldconfig + +# Darwin (MacOS-X) does not have proper libintl support +ifeq ($(shell uname -s),Darwin) +KBUILD_NO_NLS:=1 +endif + +ifneq ($(KBUILD_NO_NLS),) +CFLAGS += -DKBUILD_NO_NLS +endif + +# Build a list of all config files +DEBUG_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config/debug -type f -name '*.in') +TOOLS_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config/tools -type f -name '*.in') + +STATIC_CONFIG_FILES = $(shell find $(CT_LIB_DIR)/config -type f -name '*.in') +GEN_CONFIG_FILES=$(CT_TOP_DIR)/config.gen/debug.in \ + $(CT_TOP_DIR)/config.gen/tools.in + +CONFIG_FILES=$(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES) + +$(GEN_CONFIG_FILES):: $(CT_TOP_DIR)/config.gen + +$(CT_TOP_DIR)/config.gen: + @mkdir -p $(CT_TOP_DIR)/config.gen + +$(CT_TOP_DIR)/config.gen/debug.in:: $(DEBUG_CONFIG_FILES) + @echo "# Debug facilities menu" >$@ + @echo "# Generated file, do not edit!!!" >>$@ + @echo "menu \"Debug facilities\"" >>$@ + @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/debug/*.in)); do \ + echo "source $${f}"; \ + done >>$@ + @echo "endmenu" >>$@ + +$(CT_TOP_DIR)/config.gen/tools.in:: $(TOOLS_CONFIG_FILES) + @echo "# Tools facilities menu" >$@ + @echo "# Generated file, do not edit!!!" >>$@ + @echo "menu \"Tools facilities\"" >>$@ + @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/tools/*.in)); do \ + echo "source $${f}"; \ + done >>$@ + @echo "endmenu" >>$@ + +config menuconfig oldconfig defoldconfig:: $(KCONFIG_TOP) + +$(KCONFIG_TOP): + @ln -s $(CT_LIB_DIR)/config config + +menuconfig:: $(obj)/mconf $(CONFIG_FILES) + @$< $(KCONFIG_TOP) + +config:: $(obj)/conf $(CONFIG_FILES) + @$< $(KCONFIG_TOP) + +oldconfig:: $(obj)/conf $(CONFIG_FILES) + @$< -s $(KCONFIG_TOP) + +defoldconfig:: $(obj)/conf $(CONFIG_FILES) + @yes "" |$< -s $(KCONFIG_TOP) >/dev/null + +# Help text used by make help +help-config:: + @echo ' config - Update current config using a line-oriented program' + @echo ' menuconfig - Update current config using a menu based program' + @echo ' oldconfig - Update current config using a provided .config as base' + +# Cheesy build + +SHIPPED = $(CT_LIB_DIR)/kconfig/zconf.tab.c $(CT_LIB_DIR)/kconfig/lex.zconf.c $(CT_LIB_DIR)/kconfig/zconf.hash.c + +%.c: %.c_shipped + @ln -s $(notdir $<) $@ + +$(obj)/conf $(obj)/mconf:: $(obj) + +$(obj): + @mkdir -p $(obj) + +$(obj)/mconf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/mconf.c + @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \ + -lcurses "-DCURSES_LOC=" + +$(obj)/conf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c + @$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{conf.c,zconf.tab.c} + +clean:: + @rm -f $(CT_TOP_DIR)/kconfig/{,m}conf + @rmdir --ignore-fail-on-non-empty $(CT_TOP_DIR)/kconfig 2>/dev/null || true + @rm -f $(CT_TOP_DIR)/config + @rm -rf $(CT_TOP_DIR)/config.gen + +distclean:: + @rm -f $(CT_TOP_DIR)/config diff --git a/samples/Makefile b/samples/Makefile deleted file mode 100644 index 3d1dc60..0000000 --- a/samples/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# Makefile to manage samples - -# Build the list of available samples -CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config)) -CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config))) - -CT_SAMPLES := $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES) - -help-config:: - @echo ' saveconfig - Save current config as a preconfigured target' - -help-samples:: - @$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES) - -help-build:: - @echo ' regtest - Regtest-build all samples' - @echo ' regtest-local - Regtest-build all local samples' - @echo ' regtest-global - Regtest-build all global samples' - -# How we do build one sample -PHONY += $(CT_SAMPLES) -$(CT_SAMPLES): - @$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig - -$(patsubst %,copy_config_%,$(CT_SAMPLES)): - @if [ -f $(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config ]; then \ - cp "$(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \ - else \ - cp "$(CT_LIB_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \ - fi - -# And now for building all samples one after the other -PHONY += regtest regtest_local regtest_global -regtest: regtest-local regtest-global - -regtest-local: $(patsubst %,regtest_%,$(CT_TOP_SAMPLES)) - -regtest-global: $(patsubst %,regtest_%,$(CT_LIB_SAMPLES)) - -# One regtest per sample -# We could use a simple rule like: 'regtest: $(CT_SAMPLES)', but that doesn't -# work because we want to save the samples as well. -# Also, we don't want to see anylog at all, save for the elapsed time, and we -# want to save the log file in a specific place -# Furthermore, force the location where the toolchain will be installed. -# Finaly, we can't use 'make sample-name' as we need to provide default values -# if the options set has changed, but oldconfig does not like when stdin is -# not a terminal (eg. it is a pipe). -$(patsubst %,regtest_%,$(CT_SAMPLES)): - @samp=$(patsubst regtest_%,%,$@) ; \ - echo -e "\rBuilding sample \"$${samp}\"" && \ - $(CT_NG) copy_config_$${samp} && \ - yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \ - sed -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$${CT_TOP_DIR}/targets/tst/$${CT_TARGET}":;' .config && \ - sed -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config && \ - sed -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config && \ - sed -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config && \ - sed -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config && \ - sed -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config && \ - yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \ - $(CT_NG) build && \ - echo -e "\rSuccessfully built sample \"$${samp}\"" && \ - echo -e "\rMaking tarball for sample \"$${samp}\"" && \ - $(CT_NG) tarball && \ - echo -e "\rSuccessfully built tarball for sample \"$${samp}\"" ; \ - echo -e "\rCleaning sample \"$${samp}\"" ; \ - $(CT_NG) distclean ; \ - echo -e "\r" - -saveconfig: - @$(CT_LIB_DIR)/scripts/saveSample.sh diff --git a/samples/samples.mk b/samples/samples.mk new file mode 100644 index 0000000..3d1dc60 --- /dev/null +++ b/samples/samples.mk @@ -0,0 +1,71 @@ +# Makefile to manage samples + +# Build the list of available samples +CT_TOP_SAMPLES := $(patsubst $(CT_TOP_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_TOP_DIR)/samples/*/crosstool.config)) +CT_LIB_SAMPLES := $(filter-out $(CT_TOP_SAMPLES),$(patsubst $(CT_LIB_DIR)/samples/%/crosstool.config,%,$(wildcard $(CT_LIB_DIR)/samples/*/crosstool.config))) + +CT_SAMPLES := $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES) + +help-config:: + @echo ' saveconfig - Save current config as a preconfigured target' + +help-samples:: + @$(CT_LIB_DIR)/scripts/showSamples.sh $(CT_SAMPLES) + +help-build:: + @echo ' regtest - Regtest-build all samples' + @echo ' regtest-local - Regtest-build all local samples' + @echo ' regtest-global - Regtest-build all global samples' + +# How we do build one sample +PHONY += $(CT_SAMPLES) +$(CT_SAMPLES): + @$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig + +$(patsubst %,copy_config_%,$(CT_SAMPLES)): + @if [ -f $(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config ]; then \ + cp "$(CT_TOP_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \ + else \ + cp "$(CT_LIB_DIR)/samples/$(patsubst copy_config_%,%,$(@))/crosstool.config" "$(CT_TOP_DIR)/.config"; \ + fi + +# And now for building all samples one after the other +PHONY += regtest regtest_local regtest_global +regtest: regtest-local regtest-global + +regtest-local: $(patsubst %,regtest_%,$(CT_TOP_SAMPLES)) + +regtest-global: $(patsubst %,regtest_%,$(CT_LIB_SAMPLES)) + +# One regtest per sample +# We could use a simple rule like: 'regtest: $(CT_SAMPLES)', but that doesn't +# work because we want to save the samples as well. +# Also, we don't want to see anylog at all, save for the elapsed time, and we +# want to save the log file in a specific place +# Furthermore, force the location where the toolchain will be installed. +# Finaly, we can't use 'make sample-name' as we need to provide default values +# if the options set has changed, but oldconfig does not like when stdin is +# not a terminal (eg. it is a pipe). +$(patsubst %,regtest_%,$(CT_SAMPLES)): + @samp=$(patsubst regtest_%,%,$@) ; \ + echo -e "\rBuilding sample \"$${samp}\"" && \ + $(CT_NG) copy_config_$${samp} && \ + yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \ + sed -i -r -e 's:^(CT_PREFIX_DIR=).*$$:\1"$${CT_TOP_DIR}/targets/tst/$${CT_TARGET}":;' .config && \ + sed -i -r -e 's:^.*(CT_LOG_(WARN|INFO|EXTRA|DEBUG|ALL)).*$$:# \1 is not set:;' .config && \ + sed -i -r -e 's:^.*(CT_LOG_ERROR).*$$:\1=y:;' .config && \ + sed -i -r -e 's:^(CT_LOG_LEVEL_MAX)=.*$$:\1="ERROR":;' .config && \ + sed -i -r -e 's:^.*(CT_LOG_TO_FILE).*$$:\1=y:;' .config && \ + sed -i -r -e 's:^.*(CT_LOG_PROGRESS_BAR).*$$:\1=y:;' .config && \ + yes "" |$(CT_NG) defoldconfig >/dev/null 2>&1 && \ + $(CT_NG) build && \ + echo -e "\rSuccessfully built sample \"$${samp}\"" && \ + echo -e "\rMaking tarball for sample \"$${samp}\"" && \ + $(CT_NG) tarball && \ + echo -e "\rSuccessfully built tarball for sample \"$${samp}\"" ; \ + echo -e "\rCleaning sample \"$${samp}\"" ; \ + $(CT_NG) distclean ; \ + echo -e "\r" + +saveconfig: + @$(CT_LIB_DIR)/scripts/saveSample.sh diff --git a/steps.mk b/steps.mk new file mode 100644 index 0000000..a89a757 --- /dev/null +++ b/steps.mk @@ -0,0 +1,35 @@ +# Makefile for each steps +# Copyright 2006 Yann E. MORIN + +CT_STEPS := libc_check_config \ + kernel_check_config \ + kernel_headers \ + binutils \ + cc_core_pass_1 \ + libc_headers \ + libc_start_files \ + cc_core_pass_2 \ + libfloat \ + libc \ + cc \ + libc_finish \ + tools \ + debug \ + +$(CT_STEPS): + @$(CT_NG) RESTART=$@ STOP=$@ build + +$(patsubst %,-%,$(CT_STEPS)): + @$(CT_NG) STOP=$(patsubst -%,%,$@) build + +$(patsubst %,%-,$(CT_STEPS)): + @$(CT_NG) RESTART=$(patsubst %-,%,$@) build + +help-build:: + @echo ' liststeps - List all build steps' + +liststeps: + @echo 'Available build steps, in order:' + @for step in $(CT_STEPS); do \ + echo " - $${step}"; \ + done diff --git a/tools/Makefile b/tools/Makefile deleted file mode 100644 index 72416b8..0000000 --- a/tools/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Makefile for the tools/ sub-directory - -# Here, we can update the config.* scripts. -# If we're in CT_LIB_DIR, then CT_LIB_DIR == CT_TOP_DIR, and we can update those -# scripts for later inclusion mainline. If CT_LIB_DIR != CT_TOP_DIR, then those -# scripts are downloaded only for use in CT_TOP_DIR. - -CONFIG_SUB_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.sub" -CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub" -CONFIG_GUESS_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess" -CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess" - -$(CT_TOP_DIR)/tools: - @mkdir -p $(CT_TOP_DIR)/tools - -PHONY += updatetools -updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST) - -$(CONFIG_SUB_DEST): - @wget $(CONFIG_SUB_SRC) -O $@ - @chmod u+rwx,go+rx-w $@ - -$(CONFIG_GUESS_DEST): - @wget $(CONFIG_GUESS_SRC) -O $@ - @chmod u+rwx,go+rx-w $@ - -help-distrib:: - @echo ' updatetools - Update the config tools' - -distclean:: - @[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/tools diff --git a/tools/tools.mk b/tools/tools.mk new file mode 100644 index 0000000..72416b8 --- /dev/null +++ b/tools/tools.mk @@ -0,0 +1,31 @@ +# Makefile for the tools/ sub-directory + +# Here, we can update the config.* scripts. +# If we're in CT_LIB_DIR, then CT_LIB_DIR == CT_TOP_DIR, and we can update those +# scripts for later inclusion mainline. If CT_LIB_DIR != CT_TOP_DIR, then those +# scripts are downloaded only for use in CT_TOP_DIR. + +CONFIG_SUB_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.sub" +CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub" +CONFIG_GUESS_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess" +CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess" + +$(CT_TOP_DIR)/tools: + @mkdir -p $(CT_TOP_DIR)/tools + +PHONY += updatetools +updatetools: $(CT_TOP_DIR)/tools $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST) + +$(CONFIG_SUB_DEST): + @wget $(CONFIG_SUB_SRC) -O $@ + @chmod u+rwx,go+rx-w $@ + +$(CONFIG_GUESS_DEST): + @wget $(CONFIG_GUESS_SRC) -O $@ + @chmod u+rwx,go+rx-w $@ + +help-distrib:: + @echo ' updatetools - Update the config tools' + +distclean:: + @[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/tools -- cgit v0.10.2-6-g49f6