1#!/bin/sh 2#*************************************************************************** 3# _ _ ____ _ 4# Project ___| | | | _ \| | 5# / __| | | | |_) | | 6# | (__| |_| | _ <| |___ 7# \___|\___/|_| \_\_____| 8# 9# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. 10# 11# This software is licensed as described in the file COPYING, which 12# you should have received as part of this distribution. The terms 13# are also available at https://curl.haxx.se/docs/copyright.html. 14# 15# You may opt to use, copy, modify, merge, publish, distribute and/or sell 16# copies of the Software, and permit persons to whom the Software is 17# furnished to do so, under the terms of the COPYING file. 18# 19# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 20# KIND, either express or implied. 21# 22########################################################################### 23# 24# curl compilation script for the OS/400. 25# 26# 27# This is a shell script since make is not a standard component of OS/400. 28 29SCRIPTDIR=`dirname "${0}"` 30. "${SCRIPTDIR}/initscript.sh" 31cd "${TOPDIR}" 32 33 34# Create the OS/400 library if it does not exist. 35 36if action_needed "${LIBIFSNAME}" 37then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')" 38 system "${CMD}" 39fi 40 41 42# Create the DOCS source file if it does not exist. 43 44if action_needed "${LIBIFSNAME}/DOCS.FILE" 45then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)" 46 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')" 47 system "${CMD}" 48fi 49 50 51# Copy some documentation files if needed. 52 53for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \ 54 "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \ 55 "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \ 56 "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS.md" \ 57 "${TOPDIR}/docs/HISTORY.md" 58do MEMBER="`basename \"${TEXT}\" .OS400`" 59 MEMBER="`basename \"${MEMBER}\" .md`" 60 MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR" 61 62 if action_needed "${MEMBER}" "${TEXT}" 63 then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})" 64 CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)" 65 system "${CMD}" 66 fi 67done 68 69 70# Build in each directory. 71 72# for SUBDIR in include lib src tests 73for SUBDIR in include lib src 74do "${SCRIPTDIR}/make-${SUBDIR}.sh" 75done 76