summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/build.mk4
-rwxr-xr-xscripts/reloc.sh6
2 files changed, 6 insertions, 4 deletions
diff --git a/mk/build.mk b/mk/build.mk
index ba0301159..62c9245cf 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -248,7 +248,7 @@ distclean:
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_HOST_DIR_PFX) $(TOOLS_BUILD_DIR)
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
- @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
+ @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
.menu ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.*
else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
@@ -477,7 +477,7 @@ distclean:
${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_BUILD_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(TOOLS_BUILD_DIR)
@rm -rf $(STAGING_HOST_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
- @rm -f .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
+ @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
.menu .rebuild.* ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG
diff --git a/scripts/reloc.sh b/scripts/reloc.sh
index f7a0a1e3b..59323612f 100755
--- a/scripts/reloc.sh
+++ b/scripts/reloc.sh
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
# execute this after relocation of adk directory
-olddir=$(grep "^TOPDIR" prereq.mk |cut -d '=' -f 2)
+olddir=$(grep "^TOPDIR" prereq.mk 2>/dev/null |cut -d '=' -f 2)
newdir=$(pwd)
-if [ "$olddir" != "$newdir" ];then
+if [ ! -z $olddir ];then
+ if [ "$olddir" != "$newdir" ];then
echo "adk directory relocated!"
echo "old directory: $olddir"
echo "new directory: $newdir"
@@ -13,4 +14,5 @@ if [ "$olddir" != "$newdir" ];then
sed -i -e "s#$olddir#$newdir#g" $(find target_*/scripts -type f|xargs)
sed -i -e "s#$olddir#$newdir#" target_*/etc/ipkg.conf
sed -i -e "s#$olddir#$newdir#" prereq.mk
+ fi
fi