summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-12-16 18:12:34 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-12-16 18:12:34 (GMT)
commit65bb3ac67c741c46aa27ccd98cb7930a2b731306 (patch)
tree34841a72e903ae6054e94c588a48d66fe0f9619c
parent79154260923bf6f20c7503c91f714ac2d1c7eb3b (diff)
Get rid of the tols/ directory:
- move config.guess and config.sub from tools/ into scripts/ - update the scripts and makefile fragments accordingly /trunk/Makefile.in | 10 5 5 0 +++++----- /trunk/scripts/functions | 16 8 8 0 ++++++++-------- /trunk/scripts/scripts.mk | 28 13 15 0 +++++++++++++--------------- /trunk/ct-ng.in | 4 2 2 0 ++-- 4 files changed, 28 insertions(+), 30 deletions(-)
-rw-r--r--Makefile.in10
-rw-r--r--ct-ng.in4
-rwxr-xr-xscripts/config.guess (renamed from tools/config.guess)0
-rwxr-xr-xscripts/config.sub (renamed from tools/config.sub)0
-rw-r--r--scripts/functions16
-rw-r--r--scripts/scripts.mk (renamed from tools/tools.mk)28
6 files changed, 28 insertions, 30 deletions
diff --git a/Makefile.in b/Makefile.in
index 598b02c..9b0fbbb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -39,7 +39,7 @@ TARGETS := bin lib doc man
build: $(patsubst %,build-%,$(TARGETS))
-install: real-install
+install: build real-install
clean: $(patsubst %,clean-%,$(TARGETS))
@@ -100,7 +100,7 @@ clean-man:
ifeq ($(strip $(LOCAL)),1)
-real-install: build
+real-install:
@echo " CHMOD 'ct-ng'"
@chmod a+x ct-ng
@@ -112,7 +112,7 @@ else
#--------------------------------------
# Install rules
-real-install: build $(patsubst %,install-%,$(TARGETS))
+real-install: $(patsubst %,install-%,$(TARGETS))
install-bin: $(DESTDIR)$(BINDIR)
@echo " INST 'ct-ng'"
@@ -125,11 +125,11 @@ install-bin: $(DESTDIR)$(BINDIR)
install-lib: uninstall-lib $(DESTDIR)$(LIBDIR) install-lib-main install-lib-samples
install-lib-main: $(DESTDIR)$(LIBDIR)
- @for src_dir in config kconfig patches scripts tools; do \
+ @for src_dir in config kconfig patches scripts; do \
echo " INST '$${src_dir}/'"; \
tar cf - --exclude=.svn $${src_dir} |(cd "$(DESTDIR)$(LIBDIR)"; tar xf -); \
done
- @rm -f "$(DESTDIR)$(LIBDIR)/tools/addToolVersion.sh"
+ @rm -f "$(DESTDIR)$(LIBDIR)/scripts/addToolVersion.sh"
@echo " INST 'steps.mk'"
@install -m 644 steps.mk "$(DESTDIR)$(LIBDIR)/steps.mk"
diff --git a/ct-ng.in b/ct-ng.in
index 8b7d219..8260690 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -50,7 +50,7 @@ ifeq ($(strip $(origin V)),command line)
endif # origin V
export V SILENT ECHO
-.FORCE:
+.FORCE: $(FORCE)
.PHONY: $(PHONY)
PHONY += all
all: help
@@ -103,7 +103,7 @@ include $(CT_LIB_DIR)/config/config.mk
include $(CT_LIB_DIR)/kconfig/kconfig.mk
include $(CT_LIB_DIR)/steps.mk
include $(CT_LIB_DIR)/samples/samples.mk
-include $(CT_LIB_DIR)/tools/tools.mk
+include $(CT_LIB_DIR)/scripts/scripts.mk
help-distrib::
@echo ' tarball - Build a tarball of the configured toolchain'
diff --git a/tools/config.guess b/scripts/config.guess
index c466aa7..c466aa7 100755
--- a/tools/config.guess
+++ b/scripts/config.guess
diff --git a/tools/config.sub b/scripts/config.sub
index 9489dc7..9489dc7 100755
--- a/tools/config.sub
+++ b/scripts/config.sub
diff --git a/scripts/functions b/scripts/functions
index 6fbc9cf..7c69c00 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -617,8 +617,8 @@ CT_ExtractAndPatch() {
if [ "${CT_OVERIDE_CONFIG_GUESS_SUB}" = "y" ]; then
CT_DoLog ALL "Overiding config.guess and config.sub"
for cfg in config_guess config_sub; do
- eval ${cfg}="${CT_LIB_DIR}/tools/${cfg/_/.}"
- [ -e "${CT_TOP_DIR}/tools/${cfg/_/.}" ] && eval ${cfg}="${CT_TOP_DIR}/tools/${cfg/_/.}"
+ eval ${cfg}="${CT_LIB_DIR}/scripts/${cfg/_/.}"
+ [ -e "${CT_TOP_DIR}/scripts/${cfg/_/.}" ] && eval ${cfg}="${CT_TOP_DIR}/scripts/${cfg/_/.}"
# Can't use CT_DoExecLog because of the '{} \;' to be passed un-mangled to find
find . -type f -name "${cfg/_/.}" -exec cp -v "${!cfg}" {} \; |CT_DoLog ALL
done
@@ -630,18 +630,18 @@ CT_ExtractAndPatch() {
# Two wrappers to call config.(guess|sub) either from CT_TOP_DIR or CT_LIB_DIR.
# Those from CT_TOP_DIR, if they exist, will be be more recent than those from CT_LIB_DIR.
CT_DoConfigGuess() {
- if [ -x "${CT_TOP_DIR}/tools/config.guess" ]; then
- "${CT_TOP_DIR}/tools/config.guess"
+ if [ -x "${CT_TOP_DIR}/scripts/config.guess" ]; then
+ "${CT_TOP_DIR}/scripts/config.guess"
else
- "${CT_LIB_DIR}/tools/config.guess"
+ "${CT_LIB_DIR}/scripts/config.guess"
fi
}
CT_DoConfigSub() {
- if [ -x "${CT_TOP_DIR}/tools/config.sub" ]; then
- "${CT_TOP_DIR}/tools/config.sub" "$@"
+ if [ -x "${CT_TOP_DIR}/scripts/config.sub" ]; then
+ "${CT_TOP_DIR}/scripts/config.sub" "$@"
else
- "${CT_LIB_DIR}/tools/config.sub" "$@"
+ "${CT_LIB_DIR}/scripts/config.sub" "$@"
fi
}
diff --git a/tools/tools.mk b/scripts/scripts.mk
index e7cf1f0..ebb05e4 100644
--- a/tools/tools.mk
+++ b/scripts/scripts.mk
@@ -1,4 +1,4 @@
-# Makefile for the tools/ sub-directory
+# Makefile for the scripts/ 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
@@ -16,17 +16,9 @@ help-distrib::
# The tools are: config.guess and config.sub
CONFIG_SUB_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
-CONFIG_SUB_DEST=tools/config.sub
+CONFIG_SUB_DEST=scripts/config.sub
CONFIG_GUESS_SRC="http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
-CONFIG_GUESS_DEST=tools/config.guess
-
-# Kludge: we have a step that is called 'tools', and thus we can not define a
-# rule here that is named 'tools'. Naming it 'tools/' does not help either.
-# Thus, prepend the top directory to have a single rule description. This is
-# not as bad as it seems, because it is only refered to by teo rules in this
-# file, but still it is a kludge...
-$(CT_TOP_DIR)/tools:
- $(SILENT)mkdir -p tools
+CONFIG_GUESS_DEST=scripts/config.guess
PHONY += updatetools
updatetools: $(CONFIG_SUB_DEST) $(CONFIG_GUESS_DEST)
@@ -39,12 +31,18 @@ ifeq ($(strip $(V)),2)
wget_opt=
endif
-$(CONFIG_SUB_DEST): .FORCE $(CT_TOP_DIR)/tools
+PHONY += scripts
+scripts:
+ $(SILENT)mkdir -p scripts
+
+FROCE += $(CONFIG_SUB_DEST)
+$(CONFIG_SUB_DEST): scripts
@$(ECHO) ' WGET $@'
$(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
-$(CONFIG_GUESS_DEST): .FORCE $(CT_TOP_DIR)/tools
+FORCE += $(CONFIG_GUESS_DEST)
+$(CONFIG_GUESS_DEST): scripts
@$(ECHO) ' WGET $@'
$(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
@@ -53,5 +51,5 @@ $(CONFIG_GUESS_DEST): .FORCE $(CT_TOP_DIR)/tools
# Clean up the mess
distclean::
- @$(ECHO) " CLEAN tools"
- $(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/tools
+ @$(ECHO) " CLEAN scripts"
+ $(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/scripts