1#!/bin/sh 2#*************************************************************************** 3# _ _ ____ _ 4# Project ___| | | | _ \| | 5# / __| | | | |_) | | 6# | (__| |_| | _ <| |___ 7# \___|\___/|_| \_\_____| 8# 9# Copyright (C) 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.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# SPDX-License-Identifier: curl 23# 24########################################################################### 25# 26# curl compilation script for the OS/400. 27# 28# 29# This is a shell script since make is not a standard component of OS/400. 30 31SCRIPTDIR=`dirname "${0}"` 32. "${SCRIPTDIR}/initscript.sh" 33cd "${TOPDIR}" 34 35 36# Create the OS/400 library if it does not exist. 37 38if action_needed "${LIBIFSNAME}" 39then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')" 40 system "${CMD}" 41fi 42 43 44# Create the DOCS source file if it does not exist. 45 46if action_needed "${LIBIFSNAME}/DOCS.FILE" 47then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)" 48 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')" 49 system "${CMD}" 50fi 51 52 53# Copy some documentation files if needed. 54 55for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \ 56 "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \ 57 "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \ 58 "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS.md" \ 59 "${TOPDIR}/docs/HISTORY.md" 60do MEMBER="`basename \"${TEXT}\" .OS400`" 61 MEMBER="`basename \"${MEMBER}\" .md`" 62 MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR" 63 64 [ -e "${TEXT}" ] || continue 65 66 if action_needed "${MEMBER}" "${TEXT}" 67 then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})" 68 CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)" 69 system "${CMD}" 70 fi 71done 72 73 74# Build in each directory. 75 76# for SUBDIR in include lib src tests 77for SUBDIR in include lib src 78do "${SCRIPTDIR}/make-${SUBDIR}.sh" 79done 80