mirror of
https://github.com/moparisthebest/curl
synced 2024-11-18 07:25:14 -05:00
4a5aa6682d
This reverts renaming and usage of lib/*.h header files done
28-12-2012, reverting 2 commits:
f871de0... build: make use of 76 lib/*.h renamed files
ffd8e12... build: rename 76 lib/*.h files
This also reverts removal of redundant include guard (redundant thanks
to changes in above commits) done 2-12-2013, reverting 1 commit:
c087374... curl_setup.h: remove redundant include guard
This also reverts renaming and usage of lib/*.c source files done
3-12-2013, reverting 3 commits:
13606bb... build: make use of 93 lib/*.c renamed files
5b6e792... build: rename 93 lib/*.c files
7d83dff... build: commit 13606bbfde
follow-up 1
Start of related discussion thread:
http://curl.haxx.se/mail/lib-2013-01/0012.html
Asking for confirmation on pushing this revertion commit:
http://curl.haxx.se/mail/lib-2013-01/0048.html
Confirmation summary:
http://curl.haxx.se/mail/lib-2013-01/0079.html
NOTICE: The list of 2 files that have been modified by other
intermixed commits, while renamed, and also by at least one
of the 6 commits this one reverts follows below. These 2 files
will exhibit a hole in history unless git's '--follow' option
is used when viewing logs.
lib/curl_imap.h
lib/curl_smtp.h
192 lines
5.9 KiB
Bash
192 lines
5.9 KiB
Bash
#!/bin/sh
|
|
#
|
|
# libcurl compilation script for the OS/400.
|
|
#
|
|
|
|
SCRIPTDIR=`dirname "${0}"`
|
|
. "${SCRIPTDIR}/initscript.sh"
|
|
cd "${TOPDIR}/lib"
|
|
|
|
|
|
# Create and compile the identification source file.
|
|
|
|
echo '#pragma comment(user, "libcurl version '"${LIBCURL_VERSION}"'")' > os400.c
|
|
echo '#pragma comment(user, __DATE__)' >> os400.c
|
|
echo '#pragma comment(user, __TIME__)' >> os400.c
|
|
echo '#pragma comment(copyright, "Copyright (C) 1998-2012 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c
|
|
make_module OS400 os400.c
|
|
LINK= # No need to rebuild service program yet.
|
|
MODULES=
|
|
|
|
|
|
# Get source list.
|
|
|
|
CSOURCES()
|
|
|
|
{
|
|
shift # Drop the equal sign.
|
|
CSOURCES="$*" # Get the file names.
|
|
}
|
|
|
|
HHEADERS()
|
|
|
|
{
|
|
shift # Drop the equal sign.
|
|
HHEADERS="$*" # Get the file names.
|
|
}
|
|
|
|
. Makefile.inc
|
|
|
|
|
|
# Compile the sources into modules.
|
|
|
|
INCLUDES="'`pwd`'"
|
|
|
|
make_module OS400SYS "${SCRIPTDIR}/os400sys.c"
|
|
make_module CCSIDCURL "${SCRIPTDIR}/ccsidcurl.c"
|
|
|
|
for SRC in ${CSOURCES}
|
|
do MODULE=`db2_name "${SRC}"`
|
|
make_module "${MODULE}" "${SRC}"
|
|
done
|
|
|
|
|
|
# If needed, (re)create the static binding directory.
|
|
|
|
if action_needed "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
|
|
then LINK=YES
|
|
fi
|
|
|
|
if [ "${LINK}" ]
|
|
then rm -rf "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
|
|
CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${STATBNDDIR})"
|
|
CMD="${CMD} TEXT('LibCurl API static binding directory')"
|
|
system "${CMD}"
|
|
|
|
for MODULE in ${MODULES}
|
|
do CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${STATBNDDIR})"
|
|
CMD="${CMD} OBJ((${TARGETLIB}/${MODULE} *MODULE))"
|
|
system "${CMD}"
|
|
done
|
|
fi
|
|
|
|
|
|
# The exportation file for service program creation must be in a DB2
|
|
# source file, so make sure it exists.
|
|
|
|
if action_needed "${LIBIFSNAME}/TOOLS.FILE"
|
|
then CMD="CRTSRCPF FILE(${TARGETLIB}/TOOLS) RCDLEN(112)"
|
|
CMD="${CMD} TEXT('curl: build tools')"
|
|
system "${CMD}"
|
|
fi
|
|
|
|
|
|
# Gather the list of symbols to export.
|
|
|
|
EXPORTS=`grep '^CURL_EXTERN[ ]' \
|
|
"${TOPDIR}"/include/curl/*.h \
|
|
"${SCRIPTDIR}/ccsidcurl.h" |
|
|
sed -e 's/^.*CURL_EXTERN[ ]\(.*\)(.*$/\1/' \
|
|
-e 's/[ ]*$//' \
|
|
-e 's/^.*[ ][ ]*//' \
|
|
-e 's/^\*//' \
|
|
-e 's/(\(.*\))/\1/'`
|
|
|
|
# Create the service program exportation file in DB2 member if needed.
|
|
|
|
BSF="${LIBIFSNAME}/TOOLS.FILE/BNDSRC.MBR"
|
|
|
|
if action_needed "${BSF}" Makefile.am
|
|
then LINK=YES
|
|
fi
|
|
|
|
if [ "${LINK}" ]
|
|
then echo " STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('LIBCURL_${SONAME}')" \
|
|
> "${BSF}"
|
|
for EXPORT in ${EXPORTS}
|
|
do echo ' EXPORT SYMBOL("'"${EXPORT}"'")' >> "${BSF}"
|
|
done
|
|
|
|
echo ' ENDPGMEXP' >> "${BSF}"
|
|
fi
|
|
|
|
|
|
# Build the service program if needed.
|
|
|
|
if action_needed "${LIBIFSNAME}/${SRVPGM}.SRVPGM"
|
|
then LINK=YES
|
|
fi
|
|
|
|
if [ "${LINK}" ]
|
|
then CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
|
|
CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
|
|
CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
|
|
CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR})"
|
|
CMD="${CMD} BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)"
|
|
CMD="${CMD} TEXT('curl API library')"
|
|
CMD="${CMD} TGTRLS(${TGTRLS})"
|
|
system "${CMD}"
|
|
LINK=YES
|
|
fi
|
|
|
|
|
|
# If needed, (re)create the dynamic binding directory.
|
|
|
|
if action_needed "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
|
|
then LINK=YES
|
|
fi
|
|
|
|
if [ "${LINK}" ]
|
|
then rm -rf "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
|
|
CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
|
|
CMD="${CMD} TEXT('LibCurl API dynamic binding directory')"
|
|
system "${CMD}"
|
|
CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
|
|
CMD="${CMD} OBJ((*LIBL/${SRVPGM} *SRVPGM))"
|
|
system "${CMD}"
|
|
fi
|
|
|
|
|
|
# Rebuild the formdata test if needed.
|
|
|
|
if [ "${TEST_FORMDATA}" ]
|
|
then MODULES=
|
|
make_module TFORMDATA formdata.c "'_FORM_DEBUG' 'CURLDEBUG'"
|
|
make_module TSTREQUAL strequal.c "'_FORM_DEBUG' 'CURLDEBUG'"
|
|
make_module TMEMDEBUG memdebug.c "'_FORM_DEBUG' 'CURLDEBUG'"
|
|
make_module TMPRINTF mprintf.c "'_FORM_DEBUG' 'CURLDEBUG'"
|
|
make_module TSTRERROR strerror.c "'_FORM_DEBUG' 'CURLDEBUG'"
|
|
# The following modules should not be needed (see comment in
|
|
# formdata.c. However, there are some unsatisfied
|
|
# external references leading in the following
|
|
# modules to be (recursively) needed.
|
|
MODULES="${MODULES} EASY STRDUP SSLGEN QSSL HOSTIP HOSTIP4 HOSTIP6"
|
|
MODULES="${MODULES} URL HASH TRANSFER GETINFO COOKIE SENDF SELECT"
|
|
MODULES="${MODULES} INET_NTOP SHARE HOSTTHRE MULTI LLIST FTP HTTP"
|
|
MODULES="${MODULES} HTTP_DIGES HTTP_CHUNK HTTP_NEGOT TIMEVAL HOSTSYN"
|
|
MODULES="${MODULES} CONNECT SOCKS PROGRESS ESCAPE INET_PTON GETENV"
|
|
MODULES="${MODULES} DICT LDAP TELNET FILE TFTP NETRC PARSEDATE"
|
|
MODULES="${MODULES} SPEEDCHECK SPLAY BASE64 SECURITY IF2IP MD5"
|
|
MODULES="${MODULES} KRB5 OS400SYS"
|
|
|
|
PGMIFSNAME="${LIBIFSNAME}/TFORMDATA.PGM"
|
|
|
|
if action_needed "${PGMIFSNAME}"
|
|
then LINK=YES
|
|
fi
|
|
|
|
if [ "${LINK}" ]
|
|
then CMD="CRTPGM PGM(${TARGETLIB}/TFORMDATA)"
|
|
CMD="${CMD} ENTMOD(QADRT/QADRTMAIN2)"
|
|
CMD="${CMD} MODULE("
|
|
|
|
for MODULE in ${MODULES}
|
|
do CMD="${CMD} ${TARGETLIB}/${MODULE}"
|
|
done
|
|
|
|
CMD="${CMD} ) BNDSRVPGM(QADRTTS)"
|
|
CMD="${CMD} TGTRLS(${TGTRLS})"
|
|
system "${CMD}"
|
|
fi
|
|
fi
|