Improved dependency tracking and cleaner make output.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1820 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Expected to be passed from the environment:
|
||||
# BUILD_PROJECT - the name of the project
|
||||
# BUILD_ROOT - The root of the source files.
|
||||
# BUILD_WORK - The root of the work directory.
|
||||
|
||||
BUILD_ROOT=${BUILD_ROOT%/}/
|
||||
BUILD_WORK=${BUILD_WORK%/}/
|
||||
eval OBJDIR=\"${BUILD_WORK}\${${BUILD_PROJECT}_OBJS}\"
|
||||
|
||||
|
||||
# $1 - The prefix up to this point
|
||||
# $2 - The name of the current subdir
|
||||
recurse_subdir() {
|
||||
local REC_PREFIX SUBDIRS SUBDIR CFILES CXXFILES MFILES RCFILES FILE
|
||||
eval local ${BUILD_PROJECT}_CFILES ${BUILD_PROJECT}_CXXFILES \
|
||||
${BUILD_PROJECT}_MFILES ${BUILD_PROJECT}_RCFILES \
|
||||
${BUILD_PROJECT}_SUBDIRS
|
||||
|
||||
REC_PREFIX="$1$2/"
|
||||
if [ "$REC_PREFIX" = "/" ]; then
|
||||
REC_PREFIX=
|
||||
fi
|
||||
|
||||
eval ${BUILD_PROJECT}_CFILES=
|
||||
eval ${BUILD_PROJECT}_CXXFILES=
|
||||
eval ${BUILD_PROJECT}_MFILES=
|
||||
eval ${BUILD_PROJECT}_RCFILES=
|
||||
eval ${BUILD_PROJECT}_SUBDIRS=
|
||||
|
||||
. "${BUILD_ROOT}${REC_PREFIX}Makeinfo"
|
||||
|
||||
eval CFILES=\$${BUILD_PROJECT}_CFILES
|
||||
eval CXXFILES=\$${BUILD_PROJECT}_CXXFILES
|
||||
eval MFILES=\$${BUILD_PROJECT}_MFILES
|
||||
eval RCFILES=\$${BUILD_PROJECT}_RCFILES
|
||||
for FILE in $CFILES $CXXFILES $MFILES $RCFILES; do
|
||||
echo "${OBJDIR}${REC_PREFIX}$FILE"
|
||||
done
|
||||
|
||||
eval SUBDIRS=\$${BUILD_PROJECT}_SUBDIRS
|
||||
for SUBDIR in $SUBDIRS; do
|
||||
recurse_subdir "$REC_PREFIX" "$SUBDIR"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
. "${BUILD_ROOT}Makeproject"
|
||||
. "${BUILD_WORK}build.vars"
|
||||
|
||||
recurse_subdir "" ""
|
||||
|
||||
Reference in New Issue
Block a user