aboutsummaryrefslogtreecommitdiff
path: root/packages/OS400/make-include.sh
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2013-10-25 18:37:37 +0200
committerPatrick Monnerat <pm@datasphere.ch>2013-10-25 18:37:37 +0200
commit2cc9246477285d16d21086dfed5cc4adeee0dbc9 (patch)
tree2f360cdb14b749bc6bd28cb7982c7ae07b9b571e /packages/OS400/make-include.sh
parent650036633ffdc95c8c2181ce85582bbf3939582e (diff)
OS400: sync RPG wrapper, zlib support, fix header file names, ...
IFS compilation support, SSL GSKit backend by default, TLSv1.[12] support in GSKit for OS400 >= V7R1, no more tabs in make scripts.
Diffstat (limited to 'packages/OS400/make-include.sh')
-rw-r--r--packages/OS400/make-include.sh52
1 files changed, 36 insertions, 16 deletions
diff --git a/packages/OS400/make-include.sh b/packages/OS400/make-include.sh
index 834ee2fce..ad72cf4a7 100644
--- a/packages/OS400/make-include.sh
+++ b/packages/OS400/make-include.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Installation of the include files in the OS/400 library.
+# Installation of the header files in the OS/400 library.
#
SCRIPTDIR=`dirname "${0}"`
@@ -8,16 +8,16 @@ SCRIPTDIR=`dirname "${0}"`
cd "${TOPDIR}/include"
-# Produce the curlbuild.h include file if not yet in distribution (CVS).
+# Produce the curlbuild.h header file if not yet in distribution (CVS).
if action_needed curl/curlbuild.h
-then if action_needed curl/curlbuild.h curl/curlbuild.h.dist
- then cp -p curl/curlbuild.h.dist curl/curlbuild.h
- fi
+then if action_needed curl/curlbuild.h curl/curlbuild.h.dist
+ then cp -p curl/curlbuild.h.dist curl/curlbuild.h
+ fi
fi
-# Create the OS/400 source program file for the include files.
+# Create the OS/400 source program file for the header files.
SRCPF="${LIBIFSNAME}/H.FILE"
@@ -28,16 +28,25 @@ then CMD="CRTSRCPF FILE(${TARGETLIB}/H) RCDLEN(112)"
fi
+# Create the IFS directory for the header files.
+
+IFSINCLUDE="${IFSDIR}/include/curl"
+
+if action_needed "${IFSINCLUDE}"
+then mkdir -p "${IFSINCLUDE}"
+fi
+
+
# Enumeration values are used as va_arg tagfields, so they MUST be
# integers.
copy_hfile()
{
- destfile="${1}"
- srcfile="${2}"
- shift
- shift
+ destfile="${1}"
+ srcfile="${2}"
+ shift
+ shift
sed -e '1i\
#pragma enum(int)\
' "${@}" -e '$a\
@@ -48,23 +57,34 @@ copy_hfile()
# Copy the header files.
for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
-do DEST="${SRCPF}/`db2_name \"${HFILE}\"`.MBR"
+do case "`basename \"${HFILE}\" .h`" in
+ stdcheaders|typecheck-gcc)
+ continue;;
+ esac
+
+ DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
+
if action_needed "${DEST}" "${HFILE}"
then copy_hfile "${DEST}" "${HFILE}"
+ IFSDEST="${IFSINCLUDE}/`basename \"${HFILE}\"`"
+ rm -f "${IFSDEST}"
+ ln -s "${DEST}" "${IFSDEST}"
fi
done
-# Copy the ILE/RPG include file, setting-up version number.
+# Copy the ILE/RPG header file, setting-up version number.
- versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+rm -f "${IFSINCLUDE}/curl.inc.rpgle"
+ln -s "${SRCPF}/CURL.INC.MBR" "${IFSINCLUDE}/curl.inc.rpgle"
-# Duplicate file H as CURL to support more include path forms.
+# Duplicate file H as CURL to support more include path forms.
if action_needed "${LIBIFSNAME}/CURL.FILE"
-then :
-else system "DLTF FILE(${TARGETLIB}/CURL)"
+then :
+else system "DLTF FILE(${TARGETLIB}/CURL)"
fi
CMD="CRTDUPOBJ OBJ(H) FROMLIB(${TARGETLIB}) OBJTYPE(*FILE) TOLIB(*FROMLIB)"