Revert "Imported Upstream version 7.44.0"
[platform/upstream/curl.git] / packages / OS400 / makefile.sh
1 #!/bin/sh
2 #
3 #       curl compilation script for the OS/400.
4 #
5 #
6 #       This is a shell script since make is not a standard component of OS/400.
7
8 SCRIPTDIR=`dirname "${0}"`
9 . "${SCRIPTDIR}/initscript.sh"
10 cd "${TOPDIR}"
11
12
13 #       Create the OS/400 library if it does not exist.
14
15 if action_needed "${LIBIFSNAME}"
16 then    CMD="CRTLIB LIB(${TARGETLIB}) TEXT('curl: multiprotocol support API')"
17         system "${CMD}"
18 fi
19
20
21 #       Create the DOCS source file if it does not exist.
22
23 if action_needed "${LIBIFSNAME}/DOCS.FILE"
24 then    CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
25         CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
26         system "${CMD}"
27 fi
28
29
30 #       Copy some documentation files if needed.
31
32 for TEXT in "${TOPDIR}/COPYING" "${SCRIPTDIR}/README.OS400"             \
33     "${TOPDIR}/CHANGES" "${TOPDIR}/docs/THANKS" "${TOPDIR}/docs/FAQ"    \
34     "${TOPDIR}/docs/FEATURES" "${TOPDIR}/docs/SSLCERTS"                 \
35     "${TOPDIR}/docs/RESOURCES" "${TOPDIR}/docs/VERSIONS"                \
36     "${TOPDIR}/docs/HISTORY"
37 do      MEMBER="`basename \"${TEXT}\" .OS400`"
38         MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
39
40         if action_needed "${MEMBER}" "${TEXT}"
41         then    CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})"
42                 CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
43                 system "${CMD}"
44         fi
45 done
46
47
48 #       Build in each directory.
49
50 # for SUBDIR in include lib src tests
51 for SUBDIR in include lib src
52 do      "${SCRIPTDIR}/make-${SUBDIR}.sh"
53 done