diff --git a/Makefile b/Makefile index 9c20f4f26d..b5c4dd6ae4 100644 --- a/Makefile +++ b/Makefile @@ -349,7 +349,7 @@ endif download: $(BIN) $(call DOWNLOAD, $<) -depend: +depend: context @for dir in $(MAKEDIRS) ; do \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \ done diff --git a/tools/configure.sh b/tools/configure.sh index ad82b457ec..8e56c2a0ea 100755 --- a/tools/configure.sh +++ b/tools/configure.sh @@ -118,8 +118,25 @@ fi # Check for the apps/ dir in the usual place if appdir was not provided if [ -z "${appdir}" ]; then + + # Check for a version file + + unset CONFIG_NUTTX_VERSION + if [ -x "${TOPDIR}/.version" ]; then + source "${TOPDIR}/.version" + fi + + # Check for an unversioned apps/ directory + if [ -d "${TOPDIR}/../apps" ]; then appdir="../apps" + + else + # Check for a versioned apps/ directory + + if [ -d "${TOPDIR}/../apps-${CONFIG_NUTTX_VERSION}" ]; then + appdir="../apps-${CONFIG_NUTTX_VERSION}" + fi fi fi diff --git a/tools/zipme.sh b/tools/zipme.sh index 7c08bd2714..bf8041a4f7 100755 --- a/tools/zipme.sh +++ b/tools/zipme.sh @@ -132,11 +132,15 @@ if [ -f ${ZIP_NAME} ] ; then { echo "rm ${ZIP_NAME} failed!" ; exit 1 ; } fi -# Write a version file +# Write a version file. The syntax of file is such that it may be sourced +# by a bash script or included by a Makefile -echo "CONFIG_NUTTX_VERSION=\"${VERSION}\" >${NUTTX}/.version +echo "#!/bin/bash" >${NUTTX}/.version +echo "" >>${NUTTX}/.version +echo "CONFIG_NUTTX_VERSION=\"${VERSION}\" >>${NUTTX}/.version +chmod 755 ${NUTTX}/.version -# Then zip it +# Then zip-up the directories ${TAR} ${TAR_NAME} nuttx-${VERSION}/nuttx nuttx-${VERSION}/apps || \ { echo "tar of ${TAR_NAME} failed!" ; exit 1 ; }