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"
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')"
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')"
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)"
49 # Build in each directory.
51 for SUBDIR
in include lib src tests
52 do "${SCRIPTDIR}/make-${SUBDIR}.sh"