1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-10 08:58:16 +03:00

os400: initscript make_module(): Use options instead of positional parameters.

This commit is contained in:
Patrick Monnerat 2015-04-17 17:09:13 +02:00 committed by Daniel Veillard
parent 11e805d397
commit 1463a91df5
2 changed files with 35 additions and 10 deletions

View File

@ -165,15 +165,38 @@ action_needed()
}
# make_module module_name source_name [additional_definitions]
# make_module [option] module_name source_name
#
# Compile source name into ASCII module if needed.
# As side effect, append the module name to variable MODULES.
# Set LINK to "YES" if the module has been compiled.
# Options are:
# --define <additional definitions>
# --ebcdic
# --sysiconv
make_module()
{
DEFN=
EBCDIC=
SYSICONV=
while true
do case "${1}" in
--define)
DEFN="${2}"
shift
;;
--ebcdic)
EBCDIC=yes
;;
--sysiconv)
SYSICONV=yes
;;
*) break
esac
shift
done
MODULES="${MODULES} ${1}"
MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
action_needed "${MODIFSNAME}" "${2}" || return 0;
@ -185,7 +208,7 @@ make_module()
# the source file and we compile that temporary file.
rm -f __tmpsrcf.c
if [ "${4}" != 'ebcdic' ]
if [ -z "${EBCDIC}" ]
then echo "#line 1 \"${2}\"" >> __tmpsrcf.c
echo "#pragma convert(819)" >> __tmpsrcf.c
echo '#include "wrappers.h"' >> __tmpsrcf.c
@ -197,8 +220,10 @@ make_module()
CMD="${CMD} OPTION(*INCDIRFIRST)"
CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
CMD="${CMD} INCDIR("
CMD="${CMD} '${TOPDIR}/os400/iconv'"
if [ "${4}" != 'ebcdic' ]
if [ -z "${SYSICONV}" ]
then CMD="${CMD} '${TOPDIR}/os400/iconv'"
fi
if [ -z "${EBCDIC}" ]
then CMD="${CMD} '/qibm/proddata/qadrt/include'"
fi
CMD="${CMD} '${TOPDIR}/os400' '${TOPDIR}/os400/dlfcn'"
@ -211,7 +236,7 @@ make_module()
CMD="${CMD} OUTPUT(${OUTPUT})"
CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
CMD="${CMD} DBGVIEW(${DEBUG})"
CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${3})"
CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${DEFN})"
system "${CMD}"
rm -f __tmpsrcf.c

View File

@ -62,11 +62,11 @@ INCLUDES="'`pwd`'"
# OS/400 specific modules first.
make_module DLFCN "${SCRIPTDIR}/dlfcn/dlfcn.c" '' ebcdic
make_module ICONV "${SCRIPTDIR}/iconv/iconv.c" '' ebcdic
make_module WRAPPERS "${SCRIPTDIR}/wrappers.c" '' ebcdic
make_module TRANSCODE "${SCRIPTDIR}/transcode.c"
make_module RPGSUPPORT "${SCRIPTDIR}/rpgsupport.c"
make_module --ebcdic DLFCN "${SCRIPTDIR}/dlfcn/dlfcn.c"
make_module --ebcdic ICONV "${SCRIPTDIR}/iconv/iconv.c"
make_module --ebcdic WRAPPERS "${SCRIPTDIR}/wrappers.c"
make_module TRANSCODE "${SCRIPTDIR}/transcode.c"
make_module RPGSUPPORT "${SCRIPTDIR}/rpgsupport.c"
# Regular libxml2 modules.