mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
os400: implement CLI tool
This is provided as a QADRT (ascii) program, a link to it in the IFS and a minimal CL command. Closes #11547
This commit is contained in:
parent
b137634ba3
commit
6f8d9cc4e9
11 changed files with 471 additions and 40 deletions
|
|
@ -23,5 +23,76 @@
|
|||
#
|
||||
###########################################################################
|
||||
#
|
||||
#
|
||||
# Not implemented yet on OS/400.
|
||||
# Command line interface tool compilation script for the OS/400.
|
||||
|
||||
SCRIPTDIR=`dirname "${0}"`
|
||||
. "${SCRIPTDIR}/initscript.sh"
|
||||
cd "${TOPDIR}/src"
|
||||
|
||||
|
||||
# Get source lists.
|
||||
# CURL_CFILES are in the current directory.
|
||||
# CURLX_CFILES are in the lib directory and need to be recompiled because
|
||||
# some function names change using macros.
|
||||
|
||||
get_make_vars Makefile.inc
|
||||
|
||||
|
||||
# Compile the sources into modules.
|
||||
|
||||
LINK=
|
||||
MODULES=
|
||||
INCLUDES="'${TOPDIR}/lib'"
|
||||
|
||||
for SRC in ${CURLX_CFILES}
|
||||
do MODULE=`db2_name "${SRC}"`
|
||||
MODULE=`db2_name "X${MODULE}"`
|
||||
make_module "${MODULE}" "${SRC}"
|
||||
done
|
||||
|
||||
for SRC in ${CURL_CFILES}
|
||||
do MODULE=`db2_name "${SRC}"`
|
||||
make_module "${MODULE}" "${SRC}"
|
||||
done
|
||||
|
||||
|
||||
# Link modules into program.
|
||||
|
||||
MODULES="`echo \"${MODULES}\" | sed \"s/[^ ][^ ]*/${TARGETLIB}\/&/g\"`"
|
||||
CMD="CRTPGM PGM(${TARGETLIB}/CURL)"
|
||||
CMD="${CMD} ENTMOD(${TARGETLIB}/CURLMAIN)"
|
||||
CMD="${CMD} MODULE(${MODULES})"
|
||||
CMD="${CMD} BNDSRVPGM(${TARGETLIB}/${SRVPGM} QADRTTS)"
|
||||
CMD="${CMD} TGTRLS(${TGTRLS})"
|
||||
CLcommand "${CMD}"
|
||||
|
||||
|
||||
# Create the IFS command.
|
||||
|
||||
IFSBIN="${IFSDIR}/bin"
|
||||
|
||||
if action_needed "${IFSBIN}"
|
||||
then mkdir -p "${IFSBIN}"
|
||||
fi
|
||||
|
||||
rm -f "${IFSBIN}/curl"
|
||||
ln -s "/QSYS.LIB/${TARGETLIB}.LIB/CURL.PGM" "${IFSBIN}/curl"
|
||||
|
||||
|
||||
# Create the CL interface program.
|
||||
|
||||
if action_needed "${LIBIFSNAME}/CURLCL.PGM" "${SCRIPTDIR}/curlcl.c"
|
||||
then CMD="CRTBNDC PGM(${TARGETLIB}/CURLCL)"
|
||||
CMD="${CMD} SRCSTMF('${SCRIPTDIR}/curlcl.c')"
|
||||
CMD="${CMD} TGTCCSID(${TGTCCSID})"
|
||||
CLcommand "${CMD}"
|
||||
fi
|
||||
|
||||
|
||||
# Create the CL command.
|
||||
|
||||
if action_needed "${LIBIFSNAME}/CURL.CMD" "${SCRIPTDIR}/curl.cmd"
|
||||
then CMD="CRTCMD CMD(${TARGETLIB}/CURL) PGM(${TARGETLIB}/CURLCL)"
|
||||
CMD="${CMD} SRCSTMF('${SCRIPTDIR}/curl.cmd')"
|
||||
CLcommand "${CMD}"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue