aboutsummaryrefslogtreecommitdiff
path: root/packages/OS400/make-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packages/OS400/make-lib.sh')
-rw-r--r--packages/OS400/make-lib.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh
index 410bef05b..c772b246c 100644
--- a/packages/OS400/make-lib.sh
+++ b/packages/OS400/make-lib.sh
@@ -1,4 +1,25 @@
#!/bin/sh
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
#
# libcurl compilation script for the OS/400.
#
@@ -46,6 +67,26 @@ sed -e ':begin' \
INCLUDES="'`pwd`'"
+# Create a small C program to check ccsidcurl.c is up to date
+if action_needed "${LIBIFSNAME}/CHKSTRINGS.PGM"
+then
+ CMD="CRTBNDC PGM(${TARGETLIB}/CHKSTRINGS) SRCSTMF('${SCRIPTDIR}/chkstrings.c')"
+ CMD="${CMD} INCDIR('${TOPDIR}/include/curl' '${TOPDIR}/include' '${SRCDIR}' ${INCLUDES})"
+ system -i "${CMD}"
+ if [ $? -ne 0 ]
+ then
+ echo "ERROR: Failed to build CHKSTRINGS *PGM object!"
+ exit 2
+ else
+ ${LIBIFSNAME}/CHKSTRINGS.PGM
+ if [ $? -ne 0 ]
+ then
+ echo "ERROR: CHKSTRINGS failed!"
+ exit 2
+ fi
+ fi
+fi
+
make_module OS400SYS "${SCRIPTDIR}/os400sys.c"
make_module CCSIDCURL "${SCRIPTDIR}/ccsidcurl.c"