Add MONOLITHIC_OPTIONS

This commit is contained in:
Laurence Withers 2007-02-02 21:38:36 +00:00
parent 5592da7b80
commit 45a9c51bdc
1 changed files with 15 additions and 2 deletions

View File

@ -48,6 +48,8 @@ OUTPUT_DIRS="obj html"
# MONOLITHIC_TESTS if any file mentioned in this list is newer
# than the output file, then we recreate it
# MONOLITHIC_SOURCE a list (in order) of the source files
# MONOLITHIC_OPTIONS will #define the options to match the respective
# environment variables.
#
# Recognised formats are:
# none no special processing happens before each file
@ -68,13 +70,16 @@ make_monolithic() {
# extract options
HASHLINE=0
VERDEFINE=0
HASHDEFINE=0
if [ "$2" == "C" ]
then
HASHLINE=1
VERDEFINE=1
HASHDEFINE=1
elif [ "$2" == "Ch" ]
then
HASHLINE=1
HASHDEFINE=1
elif [ "$2" == "none" ]
then
HASHLINE=0 # dummy command
@ -115,6 +120,14 @@ make_monolithic() {
do_cmd_redir ${MONOLITHIC_OUT} echo "#define VEREXTRA \"${VEREXTRA}\"" || return 1
fi
if [ ${HASHDEFINE} -ne 0 ]
then
for opt in ${MONOLITHIC_OPTIONS}
do
do_cmd_redir ${MONOLITHIC_OUT} echo "#define ${opt} ${!opt}" || return 1
done
fi
for FILE in ${MONOLITHIC_SOURCE}
do
if [ ${HASHLINE} -ne 0 ]