summaryrefslogtreecommitdiffstats
path: root/make/gluegen-cpptasks-base.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-06-21 11:06:59 +0200
committerSven Gothel <[email protected]>2019-06-21 11:06:59 +0200
commit8ce56955f989f0d8ac21335ea563f9c7eb111154 (patch)
treed3ad10988495ea7bcfa649f13ee52e3c89eb566b /make/gluegen-cpptasks-base.xml
parent2439ef7a2e6789c2614b3f0efde11bc874cebad0 (diff)
iOS: Generalize building the native symbols file via macro
Diffstat (limited to 'make/gluegen-cpptasks-base.xml')
-rwxr-xr-xmake/gluegen-cpptasks-base.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 20e2a75..05f648a 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -1877,4 +1877,23 @@
</delete>
</sequential>
</macrodef>
+
+ <macrodef name="gluegen.make.libsymbols">
+ <attribute name="builddir" />
+ <attribute name="nativelib" />
+ <attribute name="symbolsfile" />
+ <sequential>
+ <!-- invoke nm in a most compatible way, tested on GNU/Linux and MacOS -->
+ <exec executable="nm" dir="@{builddir}" output="@{symbolsfile}.raw">
+ <arg value="--extern-only"/>
+ <arg value="--defined-only"/>
+ <arg value="@{nativelib}"/>
+ </exec>
+ <exec executable="awk" dir="@{builddir}" output="@{symbolsfile}">
+ <arg value="{ print $3 }"/>
+ <arg value="@{symbolsfile}.raw"/>
+ </exec>
+ <delete file="@{symbolsfile}.raw" quiet="true" failonerror="false" />
+ </sequential>
+ </macrodef>
</project>