Add MONOLITHIC_OPTIONS
This commit is contained in:
parent
5592da7b80
commit
45a9c51bdc
13
skel/make.sh
13
skel/make.sh
|
@ -48,6 +48,8 @@ OUTPUT_DIRS="obj html"
|
||||||
# MONOLITHIC_TESTS if any file mentioned in this list is newer
|
# MONOLITHIC_TESTS if any file mentioned in this list is newer
|
||||||
# than the output file, then we recreate it
|
# than the output file, then we recreate it
|
||||||
# MONOLITHIC_SOURCE a list (in order) of the source files
|
# 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:
|
# Recognised formats are:
|
||||||
# none no special processing happens before each file
|
# none no special processing happens before each file
|
||||||
|
@ -68,13 +70,16 @@ make_monolithic() {
|
||||||
# extract options
|
# extract options
|
||||||
HASHLINE=0
|
HASHLINE=0
|
||||||
VERDEFINE=0
|
VERDEFINE=0
|
||||||
|
HASHDEFINE=0
|
||||||
if [ "$2" == "C" ]
|
if [ "$2" == "C" ]
|
||||||
then
|
then
|
||||||
HASHLINE=1
|
HASHLINE=1
|
||||||
VERDEFINE=1
|
VERDEFINE=1
|
||||||
|
HASHDEFINE=1
|
||||||
elif [ "$2" == "Ch" ]
|
elif [ "$2" == "Ch" ]
|
||||||
then
|
then
|
||||||
HASHLINE=1
|
HASHLINE=1
|
||||||
|
HASHDEFINE=1
|
||||||
elif [ "$2" == "none" ]
|
elif [ "$2" == "none" ]
|
||||||
then
|
then
|
||||||
HASHLINE=0 # dummy command
|
HASHLINE=0 # dummy command
|
||||||
|
@ -115,6 +120,14 @@ make_monolithic() {
|
||||||
do_cmd_redir ${MONOLITHIC_OUT} echo "#define VEREXTRA \"${VEREXTRA}\"" || return 1
|
do_cmd_redir ${MONOLITHIC_OUT} echo "#define VEREXTRA \"${VEREXTRA}\"" || return 1
|
||||||
fi
|
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}
|
for FILE in ${MONOLITHIC_SOURCE}
|
||||||
do
|
do
|
||||||
if [ ${HASHLINE} -ne 0 ]
|
if [ ${HASHLINE} -ne 0 ]
|
||||||
|
|
Loading…
Reference in New Issue