Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2017-05-16 10:54:05 -0400
committerMike Gerwitz <gerwitzm@lovullo.com>2017-07-05 13:52:06 -0400
commit652465a0a0e5be93b2c5df56b3e92e6166b936bd (patch)
tree8b349d68136218f878bab1566d975af7317e2343
parentb7596515b3d7efb64aa459d868131d256965a395 (diff)
downloadtame-652465a0a0e5be93b2c5df56b3e92e6166b936bd.tar.gz
tame-652465a0a0e5be93b2c5df56b3e92e6166b936bd.tar.bz2
tame-652465a0a0e5be93b2c5df56b3e92e6166b936bd.zip
tools/strip: Add utility
-rw-r--r--src/current/compiler/js-calc.xsl4
-rw-r--r--src/current/compiler/js.xsl4
-rwxr-xr-xtools/strip11
3 files changed, 15 insertions, 4 deletions
diff --git a/src/current/compiler/js-calc.xsl b/src/current/compiler/js-calc.xsl
index 515a375..9195b2d 100644
--- a/src/current/compiler/js-calc.xsl
+++ b/src/current/compiler/js-calc.xsl
@@ -93,11 +93,11 @@
<xsl:if test="$debugval = 'yes' or $debug-force">
<xsl:text>; </xsl:text>
- <xsl:text>( debug['</xsl:text>
+ <xsl:text>/*!+*/( debug['</xsl:text>
<xsl:value-of select="@_id" />
<xsl:text>'] || ( debug['</xsl:text>
<xsl:value-of select="@_id" />
- <xsl:text>'] = [] ) ).push( result ); </xsl:text>
+ <xsl:text>'] = [] ) ).push( result );/*!-*/ </xsl:text>
<xsl:text>return result; </xsl:text>
<xsl:text>} )() </xsl:text>
diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl
index 273b6a3..11f1e26 100644
--- a/src/current/compiler/js.xsl
+++ b/src/current/compiler/js.xsl
@@ -918,11 +918,11 @@
<text>;</text>
- <text>( debug['</text>
+ <text>/*!+*/( debug['</text>
<value-of select="@_id" />
<text>'] || ( debug['</text>
<value-of select="@_id" />
- <text>'] = [] ) ).push( tmp ); </text>
+ <text>'] = [] ) ).push( tmp );/*!-*/ </text>
<text>result = </text>
diff --git a/tools/strip b/tools/strip
new file mode 100755
index 0000000..4474e9f
--- /dev/null
+++ b/tools/strip
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Strip debugging information from object files and executables.
+#
+# Analogous to GNU strip used for ELF and other binary formats.
+# Note that calculation breakdowns will not work after stripping.
+##
+
+# debug assignments
+sed -i 's#/\*!+\*/[^!]\+/\*!-\*/##g' ui/package.js
+