2007-08-23 10:30:24 -04:00
|
|
|
#!/bin/sh
|
2020-03-23 09:44:29 -04:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
|
|
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
|
|
|
# are also available at https://curl.haxx.se/docs/copyright.html.
|
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
###########################################################################
|
2007-08-23 10:30:24 -04:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2007-08-24 11:56:59 -04:00
|
|
|
# Create the DOCS source file if it does not exist.
|
|
|
|
|
|
|
|
if action_needed "${LIBIFSNAME}/DOCS.FILE"
|
2015-07-21 10:36:34 -04:00
|
|
|
then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)"
|
2007-08-24 11:56:59 -04:00
|
|
|
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" \
|
2017-10-19 13:48:21 -04:00
|
|
|
"${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS.md" \
|
2007-08-24 11:56:59 -04:00
|
|
|
"${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS" \
|
2017-10-19 13:48:21 -04:00
|
|
|
"${TOPDIR}/docs/HISTORY.md"
|
2007-08-24 11:56:59 -04:00
|
|
|
do MEMBER="`basename \"${TEXT}\" .OS400`"
|
2017-10-19 13:48:21 -04:00
|
|
|
MEMBER="`basename \"${MEMBER}\" .md`"
|
2007-08-24 11:56:59 -04:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2007-08-23 10:30:24 -04:00
|
|
|
# Build in each directory.
|
|
|
|
|
2013-07-15 12:38:17 -04:00
|
|
|
# for SUBDIR in include lib src tests
|
|
|
|
for SUBDIR in include lib src
|
2007-08-23 10:30:24 -04:00
|
|
|
do "${SCRIPTDIR}/make-${SUBDIR}.sh"
|
|
|
|
done
|