Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / packages / OS400 / make-include.sh
blob7f19fbc9b304acd6c958124fcca7691adbdfd3cc
1 #!/bin/sh
3 # Installation of the include files in the OS/400 library.
5 # $Id: make-include.sh,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
7 SCRIPTDIR=`dirname "${0}"`
8 . "${SCRIPTDIR}/initscript.sh"
9 cd "${TOPDIR}/include"
12 # Produce the curlbuild.h include file.
14 if action_needed curl/curlbuild.h curl/curlbuild.h.dist
15 then cp -p curl/curlbuild.h.dist curl/curlbuild.h
19 # Create the OS/400 source program file for the include files.
21 SRCPF="${LIBIFSNAME}/H.FILE"
23 if action_needed "${SRCPF}"
24 then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
25 CMD="${CMD} CCSID(${TGTCCSID}) TEXT('curl: Header files')"
26 system "${CMD}"
30 # Enumeration values are used as va_arg tagfields, so they MUST be
31 # integers.
33 copy_hfile()
36 sed -e '1i\
37 #pragma enum(int)\
38 ' -e '$a\
39 #pragma enum(pop)\
40 ' < "${2}" > "${1}"
43 # Copy the header files.
45 for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
46 do DEST="${SRCPF}/`db2_name \"${HFILE}\"`.MBR"
47 if action_needed "${DEST}" "${HFILE}"
48 then copy_hfile "${DEST}" "${HFILE}"
50 done
53 # Copy the ILE/RPG include file, setting-up version number.
55 versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"