mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
Use tools discovered by ./configure in scripts/saveSample.sh
/trunk/Makefile.in | 7 6 1 0 ++++++- /trunk/scripts/saveSample.sh.in | 23 13 10 0 +++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-)
This commit is contained in:
parent
3f4bf75a27
commit
430ce931e1
@ -103,7 +103,7 @@ uninstall: real-uninstall
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Build rules
|
# Build rules
|
||||||
|
|
||||||
build-bin: ct-ng scripts/crosstool-NG.sh
|
build-bin: ct-ng scripts/crosstool-NG.sh scripts/saveSample.sh
|
||||||
|
|
||||||
build-lib: paths.mk
|
build-lib: paths.mk
|
||||||
|
|
||||||
@ -150,6 +150,8 @@ clean-bin:
|
|||||||
@rm -f ct-ng
|
@rm -f ct-ng
|
||||||
@echo " RM 'script/crosstool-NG.sh'"
|
@echo " RM 'script/crosstool-NG.sh'"
|
||||||
@rm -f scripts/crosstool-NG.sh
|
@rm -f scripts/crosstool-NG.sh
|
||||||
|
@echo " RM 'script/saveSample.sh'"
|
||||||
|
@rm -f scripts/saveSample.sh
|
||||||
|
|
||||||
clean-lib:
|
clean-lib:
|
||||||
@echo " RM 'paths.mk'"
|
@echo " RM 'paths.mk'"
|
||||||
@ -173,6 +175,8 @@ real-install:
|
|||||||
@chmod a+x ct-ng
|
@chmod a+x ct-ng
|
||||||
@echo " CHMOD 'scripts/crosstool-NG.sh'"
|
@echo " CHMOD 'scripts/crosstool-NG.sh'"
|
||||||
@chmod a+x scripts/crosstool-NG.sh
|
@chmod a+x scripts/crosstool-NG.sh
|
||||||
|
@echo " CHMOD 'scripts/saveSample.sh'"
|
||||||
|
@chmod a+x scripts/saveSample.sh
|
||||||
|
|
||||||
real-uninstall:
|
real-uninstall:
|
||||||
@true
|
@true
|
||||||
@ -201,6 +205,7 @@ install-lib-main: $(DESTDIR)$(LIBDIR)
|
|||||||
|(cd "$(DESTDIR)$(LIBDIR)"; tar xf -); \
|
|(cd "$(DESTDIR)$(LIBDIR)"; tar xf -); \
|
||||||
done
|
done
|
||||||
@chmod a+x $(DESTDIR)$(LIBDIR)/scripts/crosstool-NG.sh
|
@chmod a+x $(DESTDIR)$(LIBDIR)/scripts/crosstool-NG.sh
|
||||||
|
@chmod a+x $(DESTDIR)$(LIBDIR)/scripts/saveSample.sh
|
||||||
@rm -f "$(DESTDIR)$(LIBDIR)/scripts/addToolVersion.sh"
|
@rm -f "$(DESTDIR)$(LIBDIR)/scripts/addToolVersion.sh"
|
||||||
@echo " INST 'steps.mk'"
|
@echo " INST 'steps.mk'"
|
||||||
@$(install) -m 644 steps.mk "$(DESTDIR)$(LIBDIR)/steps.mk"
|
@$(install) -m 644 steps.mk "$(DESTDIR)$(LIBDIR)/steps.mk"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!@@CT_bash@@
|
||||||
|
|
||||||
# This script is responsible for saving the current configuration into a
|
# This script is responsible for saving the current configuration into a
|
||||||
# sample to be used later on as a pre-configured target.
|
# sample to be used later on as a pre-configured target.
|
||||||
@ -8,6 +8,9 @@
|
|||||||
# - the uClibc .config file if uClibc selected
|
# - the uClibc .config file if uClibc selected
|
||||||
# - info about who reported the sample
|
# - info about who reported the sample
|
||||||
|
|
||||||
|
# Parse the tools' paths configuration
|
||||||
|
. "${CT_LIB_DIR}/paths.mk"
|
||||||
|
|
||||||
# We'll need the stdout later, save it
|
# We'll need the stdout later, save it
|
||||||
exec 7>&1
|
exec 7>&1
|
||||||
|
|
||||||
@ -46,7 +49,7 @@ if [ ! -d "samples/${CT_TARGET}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Save the crosstool-NG config file
|
# Save the crosstool-NG config file
|
||||||
sed -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \
|
"${sed}" -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \
|
||||||
-e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \
|
-e 's|^# CT_LOG_TO_FILE is not set$|CT_LOG_TO_FILE=y|;' \
|
||||||
-e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \
|
-e 's|^# CT_LOG_FILE_COMPRESS is not set$|CT_LOG_FILE_COMPRESS=y|;' \
|
||||||
-e 's|^(CT_LOCAL_TARBALLS_DIR)=.*|\1="${HOME}/src"|;' \
|
-e 's|^(CT_LOCAL_TARBALLS_DIR)=.*|\1="${HOME}/src"|;' \
|
||||||
@ -59,8 +62,8 @@ sed -r -e 's|^(CT_PREFIX_DIR)=.*|\1="${HOME}/x-tools/${CT_TARGET}"|;' \
|
|||||||
CT_DoAddFileToSample() {
|
CT_DoAddFileToSample() {
|
||||||
source="$1"
|
source="$1"
|
||||||
dest="$2"
|
dest="$2"
|
||||||
inode_s=$(ls -i "${source}" |gawk '{ print $1; }')
|
inode_s=$(ls -i "${source}" |"${awk}" '{ print $1; }')
|
||||||
inode_d=$(ls -i "${dest}" 2>/dev/null |gawk '{ print $1; }' || true)
|
inode_d=$(ls -i "${dest}" 2>/dev/null |"${awk}" '{ print $1; }' || true)
|
||||||
if [ "${inode_s}" != "${inode_d}" ]; then
|
if [ "${inode_s}" != "${inode_d}" ]; then
|
||||||
cp "${source}" "${dest}"
|
cp "${source}" "${dest}"
|
||||||
fi
|
fi
|
||||||
@ -76,7 +79,7 @@ fi
|
|||||||
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
|
if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
|
||||||
# We save the file, and then point the saved sample to this file
|
# We save the file, and then point the saved sample to this file
|
||||||
CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
|
CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
|
||||||
sed -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE=).+$|\1"'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
|
"${sed}" -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE=).+$|\1"'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
|
||||||
"samples/${CT_TARGET}/crosstool.config"
|
"samples/${CT_TARGET}/crosstool.config"
|
||||||
else
|
else
|
||||||
# remove any dangling files
|
# remove any dangling files
|
Loading…
Reference in New Issue
Block a user