lw-build-system/scripts/build.lib.c/build.monolithic
Laurence Withers 61e8d27edd Allow build.monolithic to search subdirectories.
Uses `find' rather than `echo' to get a list of all source files within
the module directory. The list is passed to sort. Allows subdirectories
using the nnn_name notation to be included in the correct order.
2007-09-26 11:52:40 +00:00

21 lines
587 B
Bash

# These are external variables, and shouldn't clash with anything else
# @CNAME@_MONOLITHIC
SRC="obj/@NAME@.c"
HDR="obj/@HEADER_NAME@"
MONOLITHIC_TESTS="src/@NAME@/build.lib src/@NAME@/build.monolithic"
if [ -z "${@CNAME@_MONOLITHIC}" ]
then
MONOLITHIC_SOURCE="$(find src/@NAME@/ -name '*.h' | sort)"
make_monolithic ${HDR} Ch || return 1
MONOLITHIC_SOURCE="$(find src/@NAME@/ -name '*.c' | sort)"
make_monolithic ${SRC} C || return 1
@CNAME@_MONOLITHIC=1
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${HDR}"
fi
# kate: @KATE_MODELINE@
# vim: syntax=sh:@VIM_MODELINE@