3 # Installation of the header files in the OS/400 library.
6 SCRIPTDIR=`dirname "${0}"`
7 . "${SCRIPTDIR}/initscript.sh"
11 # Produce the curlbuild.h header file if not yet in distribution (CVS).
13 if action_needed curl/curlbuild.h
14 then if action_needed curl/curlbuild.h curl/curlbuild.h.dist
15 then cp -p curl/curlbuild.h.dist curl/curlbuild.h
20 # Create the OS/400 source program file for the header files.
22 SRCPF="${LIBIFSNAME}/H.FILE"
24 if action_needed "${SRCPF}"
25 then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
26 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('curl: Header files')"
31 # Create the IFS directory for the header files.
33 IFSINCLUDE="${IFSDIR}/include/curl"
35 if action_needed "${IFSINCLUDE}"
36 then mkdir -p "${IFSINCLUDE}"
40 # Enumeration values are used as va_arg tagfields, so they MUST be
54 ' < "${srcfile}" > "${destfile}"
57 # Copy the header files.
59 for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
60 do case "`basename \"${HFILE}\" .h`" in
61 stdcheaders|typecheck-gcc)
65 DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
67 if action_needed "${DEST}" "${HFILE}"
68 then copy_hfile "${DEST}" "${HFILE}"
69 IFSDEST="${IFSINCLUDE}/`basename \"${HFILE}\"`"
71 ln -s "${DEST}" "${IFSDEST}"
76 # Copy the ILE/RPG header file, setting-up version number.
78 versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
79 rm -f "${IFSINCLUDE}/curl.inc.rpgle"
80 ln -s "${SRCPF}/CURL.INC.MBR" "${IFSINCLUDE}/curl.inc.rpgle"
83 # Duplicate file H as CURL to support more include path forms.
85 if action_needed "${LIBIFSNAME}/CURL.FILE"
87 else system "DLTF FILE(${TARGETLIB}/CURL)"
90 CMD="CRTDUPOBJ OBJ(H) FROMLIB(${TARGETLIB}) OBJTYPE(*FILE) TOLIB(*FROMLIB)"
91 CMD="${CMD} NEWOBJ(CURL) DATA(*YES)"