aboutsummaryrefslogtreecommitdiffstats
path: root/os400/make-rpg.sh
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2015-04-16 16:04:06 +0800
committerDaniel Veillard <veillard@redhat.com>2015-04-16 16:04:06 +0800
commit22b0415a8945a5e166457c6f8e3785f89339c533 (patch)
tree284392723764d10d562b0b440e35c1ea9e489368 /os400/make-rpg.sh
parent213f1fe0d76d30eaed6e5853057defc43e6df2c9 (diff)
downloadandroid_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.tar.gz
android_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.tar.bz2
android_external_libxml2-22b0415a8945a5e166457c6f8e3785f89339c533.zip
os400: fix various ILE/RPG types definitions. Adjust build scripts.
- A typo caused an undefined symbol reference. - A structure field name did not match the corresponding C name due to a typo. - Some structured fields were not properly aligned. - The long/ulong types were wrongly mapped to 64-bit types. - A typo in a /include directive caused a compilation error. - Doc files copy now converts from UTF-8 and split long lines. - Adjust /include file name mapping translation for proper prefix handling.
Diffstat (limited to 'os400/make-rpg.sh')
-rw-r--r--os400/make-rpg.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/os400/make-rpg.sh b/os400/make-rpg.sh
index 95d3249c..664b47bf 100644
--- a/os400/make-rpg.sh
+++ b/os400/make-rpg.sh
@@ -25,8 +25,6 @@ fi
# Map file names to DB2 name syntax.
-> tmpsubstfile
-
for HFILE in *.rpgle *.rpgle.in
do NAME="`basename \"${HFILE}\" .in`"
VAR="`basename \"${NAME}\" .rpgle`"
@@ -36,9 +34,14 @@ do NAME="`basename \"${HFILE}\" .in`"
then VAL=SCHMTYPES
fi
- echo "s/${VAR}/${VAL}/g" >> tmpsubstfile
eval "VAR_${VAR}=\"${VAL}\""
-done
+ echo "${VAR} s/${VAR}/${VAL}/g"
+done > tmpsubstfile1
+
+# Order substitution commands so that a prefix appears after all
+# file names beginning with the prefix.
+
+sort -r tmpsubstfile1 | sed 's/^[^ ]*[ ]*//' > tmpsubstfile2
change_include()
@@ -47,7 +50,7 @@ change_include()
sed -e '\#^....../include *"libxmlrpg/#{' \
-e 's///' \
-e 's/".*//' \
- -f tmpsubstfile \
+ -f tmpsubstfile2 \
-e 's#.*# /include libxmlrpg,&#' \
-e '}'
}