}
-# make_module [option] module_name source_name
+# make_module module_name source_name [additional_definitions]
#
# 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;
# the source file and we compile that temporary file.
rm -f __tmpsrcf.c
- if [ -z "${EBCDIC}" ]
+ if [ "${4}" != 'ebcdic' ]
then echo "#line 1 \"${2}\"" >> __tmpsrcf.c
echo "#pragma convert(819)" >> __tmpsrcf.c
echo '#include "wrappers.h"' >> __tmpsrcf.c
CMD="${CMD} OPTION(*INCDIRFIRST)"
CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
CMD="${CMD} INCDIR("
- if [ -z "${SYSICONV}" ]
- then CMD="${CMD} '${TOPDIR}/os400/iconv'"
- fi
- if [ -z "${EBCDIC}" ]
+ CMD="${CMD} '${TOPDIR}/os400/iconv'"
+ if [ "${4}" != 'ebcdic' ]
then CMD="${CMD} '/qibm/proddata/qadrt/include'"
fi
CMD="${CMD} '${TOPDIR}/os400' '${TOPDIR}/os400/dlfcn'"
CMD="${CMD} OUTPUT(${OUTPUT})"
CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
CMD="${CMD} DBGVIEW(${DEBUG})"
- CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${DEFN})"
+ CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${3})"
system "${CMD}"
rm -f __tmpsrcf.c