1#!/bin/sh 2# 3# curl compilation script for the OS/400. 4# 5# 6# This is a shell script since make is not a standard component of OS/400. 7 8SCRIPTDIR=`dirname "${0}"` 9. "${SCRIPTDIR}/initscript.sh" 10cd "${TOPDIR}" 11 12 13# Create the OS/400 library if it does not exist. 14 15if action_needed "${LIBIFSNAME}" 16then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')" 17 system "${CMD}" 18fi 19 20 21# Create the DOCS source file if it does not exist. 22 23if action_needed "${LIBIFSNAME}/DOCS.FILE" 24then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)" 25 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')" 26 system "${CMD}" 27fi 28 29 30# Copy some documentation files if needed. 31 32for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \ 33 "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \ 34 "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \ 35 "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS" \ 36 "${TOPDIR}/docs/HISTORY.md" 37do MEMBER="`basename \"${TEXT}\" .OS400`" 38 MEMBER="`basename \"${MEMBER}\" .md`" 39 MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR" 40 41 if action_needed "${MEMBER}" "${TEXT}" 42 then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})" 43 CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)" 44 system "${CMD}" 45 fi 46done 47 48 49# Build in each directory. 50 51# for SUBDIR in include lib src tests 52for SUBDIR in include lib src 53do "${SCRIPTDIR}/make-${SUBDIR}.sh" 54done 55