# HG changeset patch # User "Yann E. MORIN" # Date 1184490544 0 # Node ID 4b8cba298bf3aa834bbff2bde48021dce66ef12d # Parent 0b0769e5a2ab4a1940302911d6a7484f80901082 Rename all Makefiles used by ct-ng into (something).mk, to avoid confusion. diff -r 0b0769e5a2ab -r 4b8cba298bf3 Makefile.in --- a/Makefile.in Sun Jul 15 08:37:22 2007 +0000 +++ b/Makefile.in Sun Jul 15 09:09:04 2007 +0000 @@ -80,7 +80,7 @@ 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 -r 0b0769e5a2ab -r 4b8cba298bf3 Makefile.steps --- a/Makefile.steps Sun Jul 15 08:37:22 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 ct-ng.in --- a/ct-ng.in Sun Jul 15 08:37:22 2007 +0000 +++ b/ct-ng.in Sun Jul 15 09:09:04 2007 +0000 @@ -70,10 +70,10 @@ @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 -r 0b0769e5a2ab -r 4b8cba298bf3 kconfig/Makefile --- a/kconfig/Makefile Sun Jul 15 08:37:22 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 kconfig/kconfig.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kconfig/kconfig.mk Sun Jul 15 09:09:04 2007 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 samples/Makefile --- a/samples/Makefile Sun Jul 15 08:37:22 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 samples/samples.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samples/samples.mk Sun Jul 15 09:09:04 2007 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 steps.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/steps.mk Sun Jul 15 09:09:04 2007 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 tools/Makefile --- a/tools/Makefile Sun Jul 15 08:37:22 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 -r 0b0769e5a2ab -r 4b8cba298bf3 tools/tools.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/tools.mk Sun Jul 15 09:09:04 2007 +0000 @@ -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