From 2147fbb3b2166a968e5f919f3f3af3ead29d6793 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 17 Feb 2018 02:03:39 +0100 Subject: [PATCH] Remove "-dev" prefix for development files Instead of adding a prefix, move development files to a different deploy directory. Signed-off-by: David Oberhollenzer --- mk.sh | 3 ++- pkg/tc-gcc2/build | 4 ++-- util/pkgcmd.sh | 7 ++++--- util/toolchain.sh | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mk.sh b/mk.sh index 890ea05..9e39461 100755 --- a/mk.sh +++ b/mk.sh @@ -19,12 +19,13 @@ TCDIR="$BUILDROOT/$BOARD/toolchain" PKGBUILDDIR="$BUILDROOT/$BOARD/build" PKGSRCDIR="$BUILDROOT/src" PKGDEPLOYDIR="$BUILDROOT/$BOARD/deploy" +PKGDEVDEPLOYDIR="$BUILDROOT/$BOARD/deploy-dev" PKGLOGDIR="$BUILDROOT/$BOARD/log" PKGDOWNLOADDIR="$BUILDROOT/download" PACKAGELIST="$BUILDROOT/$BOARD/pkglist" mkdir -p "$PKGDOWNLOADDIR" "$PKGSRCDIR" "$PKGLOGDIR" -mkdir -p "$PKGDEPLOYDIR" "$TCDIR/bin" +mkdir -p "$PKGDEPLOYDIR" "$PKGDEVDEPLOYDIR" "$TCDIR/bin" export PATH="$TCDIR/bin:$PATH" diff --git a/pkg/tc-gcc2/build b/pkg/tc-gcc2/build index b53b230..59c72ec 100755 --- a/pkg/tc-gcc2/build +++ b/pkg/tc-gcc2/build @@ -28,7 +28,7 @@ deploy() { for f in $(ls ${TCDIR}/${TARGET}/include); do for dep in $DEPENDS; do - if [ -e ${PKGDEPLOYDIR}/${dep}-dev/include/$f ]; then + if [ -e ${PKGDEVDEPLOYDIR}/${dep}/include/$f ]; then rm -rf "$TCDIR/$TARGET/include/$f" fi done @@ -36,7 +36,7 @@ deploy() { for f in $(ls ${TCDIR}/${TARGET}/lib); do for dep in $DEPENDS; do - if [ -e ${PKGDEPLOYDIR}/${dep}-dev/lib/$f ]; then + if [ -e ${PKGDEVDEPLOYDIR}/${dep}/lib/$f ]; then rm -rf "$TCDIR/$TARGET/lib/$f" continue fi diff --git a/util/pkgcmd.sh b/util/pkgcmd.sh index e3097c8..ce43f6e 100644 --- a/util/pkgcmd.sh +++ b/util/pkgcmd.sh @@ -1,6 +1,7 @@ run_pkg_command() { local FUNCTION="$1" local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME" + local DEVDEPLOYDIR="$PKGDEVDEPLOYDIR/$PKGNAME" local CHECKFILE="$PKGLOGDIR/.${PKGNAME}-${FUNCTION}" echo "$PKGNAME - $FUNCTION" @@ -12,14 +13,14 @@ run_pkg_command() { local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log" local SRC="$PKGSRCDIR/$SRCDIR" - mkdir -p "$DEPLOYDIR" "$PKGBUILDDIR" "${DEPLOYDIR}-dev" + mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR" "$DEVDEPLOYDIR" pushd "$PKGBUILDDIR" > /dev/null - $FUNCTION "$SRC" "$DEPLOYDIR" "${DEPLOYDIR}-dev" &>> "$LOGFILE" < /dev/null + $FUNCTION "$SRC" "$DEPLOYDIR" "$DEVDEPLOYDIR" &>> "$LOGFILE" < /dev/null popd > /dev/null (rmdir "$DEPLOYDIR" || true) 2> /dev/null ; - (rmdir "${DEPLOYDIR}-dev" || true) 2> /dev/null ; + (rmdir "$DEVDEPLOYDIR" || true) 2> /dev/null ; touch "$CHECKFILE" } diff --git a/util/toolchain.sh b/util/toolchain.sh index 01c9f49..e5d69b9 100644 --- a/util/toolchain.sh +++ b/util/toolchain.sh @@ -21,7 +21,7 @@ install_build_deps() { fi for deppkg in $DEPENDS; do - local devdir="$PKGDEPLOYDIR/${deppkg}-dev" + local devdir="$PKGDEVDEPLOYDIR/$deppkg" if [ -d "$devdir/include" ]; then cp -R "$devdir/include" "$TCDIR/$TARGET"