1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 17:18:48 -05:00
curl/packages/OS400/makefile.sh
Patrick Monnerat a4fc19eb4d os400: add missing symbols in config file.
Also adjust makefile to renamed files and warn about installation dirs mix-up.
2017-10-19 18:48:21 +01:00

55 lines
1.6 KiB
Bash

#!/bin/sh
#
# curl compilation script for the OS/400.
#
#
# This is a shell script since make is not a standard component of OS/400.
SCRIPTDIR=`dirname "${0}"`
. "${SCRIPTDIR}/initscript.sh"
cd "${TOPDIR}"
# Create the OS/400 library if it does not exist.
if action_needed "${LIBIFSNAME}"
then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')"
system "${CMD}"
fi
# Create the DOCS source file if it does not exist.
if action_needed "${LIBIFSNAME}/DOCS.FILE"
then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)"
CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
system "${CMD}"
fi
# Copy some documentation files if needed.
for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \
"${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \
"${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \
"${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS" \
"${TOPDIR}/docs/HISTORY.md"
do MEMBER="`basename \"${TEXT}\" .OS400`"
MEMBER="`basename \"${MEMBER}\" .md`"
MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
if action_needed "${MEMBER}" "${TEXT}"
then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})"
CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
system "${CMD}"
fi
done
# Build in each directory.
# for SUBDIR in include lib src tests
for SUBDIR in include lib src
do "${SCRIPTDIR}/make-${SUBDIR}.sh"
done