Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / packages / OS400 / makefile.sh
blobe5e9933e0991350926b5323f327132f6581976a4
1 #!/bin/sh
3 # curl compilation script for the OS/400.
5 # $Id: makefile.sh,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
7 # This is a shell script since make is not a standard component of OS/400.
9 SCRIPTDIR=`dirname "${0}"`
10 . "${SCRIPTDIR}/initscript.sh"
11 cd "${TOPDIR}"
14 # Create the OS/400 library if it does not exist.
16 if action_needed "${LIBIFSNAME}"
17 then CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')"
18 system "${CMD}"
22 # Create the DOCS source file if it does not exist.
24 if action_needed "${LIBIFSNAME}/DOCS.FILE"
25 then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
26 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
27 system "${CMD}"
31 # Copy some documentation files if needed.
33 for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400" \
34 "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ" \
35 "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS" \
36 "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS" \
37 "${TOPDIR}/docs/HISTORY"
38 do MEMBER="`basename \"${TEXT}\" .OS400`"
39 MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
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}"
46 done
49 # Build in each directory.
51 for SUBDIR in include lib src tests
52 do "${SCRIPTDIR}/make-${SUBDIR}.sh"
53 done