3 # Installation of the header files in the OS/400 library.
6 SCRIPTDIR=`dirname "${0}"`
7 . "${SCRIPTDIR}/initscript.sh"
11 # Create the OS/400 source program file for the header files.
13 SRCPF="${LIBIFSNAME}/H.FILE"
15 if action_needed "${SRCPF}"
16 then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
17 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('curl: Header files')"
22 # Create the IFS directory for the header files.
24 IFSINCLUDE="${IFSDIR}/include/curl"
26 if action_needed "${IFSINCLUDE}"
27 then mkdir -p "${IFSINCLUDE}"
31 # Enumeration values are used as va_arg tagfields, so they MUST be
45 ' < "${srcfile}" > "${destfile}"
48 # Copy the header files.
50 for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
51 do case "`basename \"${HFILE}\" .h`" in
52 stdcheaders|typecheck-gcc)
56 DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
58 if action_needed "${DEST}" "${HFILE}"
59 then copy_hfile "${DEST}" "${HFILE}"
60 IFSDEST="${IFSINCLUDE}/`basename \"${HFILE}\"`"
62 ln -s "${DEST}" "${IFSDEST}"
67 # Copy the ILE/RPG header file, setting-up version number.
69 versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
70 rm -f "${IFSINCLUDE}/curl.inc.rpgle"
71 ln -s "${SRCPF}/CURL.INC.MBR" "${IFSINCLUDE}/curl.inc.rpgle"
74 # Duplicate file H as CURL to support more include path forms.
76 if action_needed "${LIBIFSNAME}/CURL.FILE"
78 else system "DLTF FILE(${TARGETLIB}/CURL)"
81 CMD="CRTDUPOBJ OBJ(H) FROMLIB(${TARGETLIB}) OBJTYPE(*FILE) TOLIB(*FROMLIB)"
82 CMD="${CMD} NEWOBJ(CURL) DATA(*YES)"