Initial commit of visual studio 9 git build superproject.
[git-build-vc9.git] / curl / packages / OS400 / make-include.sh
blob844e23b2a6ce7b8ea1d7d8c6f0710cf02bc99b2b
1 #!/bin/sh
3 # Installation of the include files in the OS/400 library.
5 # $Id: make-include.sh,v 1.3 2008-08-25 13:58:45 patrickm 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"