diff options
author | Aron Xu <aron@debian.org> | 2015-09-21 22:55:55 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2015-09-21 22:55:55 +0800 |
commit | e85cf827a804d9abf4cbf48af6394c49331de322 (patch) | |
tree | aab761b5168447ea51ad1a64c9e1594e48f84b12 /os400/make.sh | |
parent | 4b692ee8530176868e4832e30bdc4ba5bc145948 (diff) | |
download | libxml2-e85cf827a804d9abf4cbf48af6394c49331de322.tar.gz |
Revert "Merge tag 'upstream/2.9.1+dfsg1'"
This reverts commit 21ee18bdbc9a9d4500e12a1399d51c593b8b31d4, reversing
changes made to de338c1adfa336ddb5177ceb5c63bcd868a0ebc7.
Diffstat (limited to 'os400/make.sh')
-rw-r--r-- | os400/make.sh | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/os400/make.sh b/os400/make.sh new file mode 100644 index 0000000..864e72b --- /dev/null +++ b/os400/make.sh @@ -0,0 +1,75 @@ +#!/bin/sh +# +# libxml2 compilation script for the OS/400. +# This is a shell script since make is not a standard component of OS/400. +# +# See Copyright for the status of this software. +# +# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A. +# + +SCRIPTDIR=`dirname "${0}"` +. "${SCRIPTDIR}/initscript.sh" +cd "${TOPDIR}" + + +# Create the OS/400 library if it does not exist. + +if action_needed "${LIBIFSNAME}" +then CMD="CRTLIB LIB(${TARGETLIB})" + CMD="${CMD} TEXT('libxml2: XML parser and toolkit API')" + system "${CMD}" +fi + + +# Create the DOCS source file if it does not exist. + +if action_needed "${LIBIFSNAME}/DOCS.FILE" +then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)" + CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')" + system "${CMD}" +fi + + +# Copy some documentation files if needed. + +for TEXT in "${TOPDIR}/AUTHORS" "${TOPDIR}/ChangeLog" \ + "${TOPDIR}/Copyright" "${TOPDIR}/HACKING" "${TOPDIR}/README" \ + "${TOPDIR}/MAINTAINERS" "${TOPDIR}/NEWS" "${TOPDIR}/TODO" \ + "${TOPDIR}/TODO_SCHEMAS" "${TOPDIR}/os400/README400" +do if [ -f "${TEXT}" ] + then MEMBER="`basename \"${TEXT}\" .OS400`" + MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR" + + if action_needed "${MEMBER}" "${TEXT}" + then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}')" + CMD="${CMD} TOCCSID(${TGTCCSID})" + CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)" + system "${CMD}" + fi + fi +done + + +# Build files from template. + +configFile() + +{ + args=`set | sed -e '/^[A-Za-z_][A-Za-z0-9_]*=/!d' \ + -e 's/[\/\\\\&]/\\\\&/g' \ + -e "s/'/'\\\\\\''/g" \ + -e 's/^\([^=]*\)=\(.*\)$/-e '\''s\/@\1@\/\2\/g'\'/` + eval sed ${args} < "${1}".in > "${1}" +} + +configFile include/libxml/xmlversion.h +configFile os400/os400config.h +mv os400/os400config.h config.h + + +# Build in each directory. + +for SUBDIR in include rpg src +do "${SCRIPTDIR}/make-${SUBDIR}.sh" +done |