changeset 164:54b684cdbdf9

head with a negative number is not portable, replace with an ugly workaround
author Lucas Thompson <dev@lucas.im>
date Tue, 27 Jun 2017 14:25:09 +0100
parents bd5f8a600401
children 1267740d9324 772a51eec359
files Makefile.inc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.inc	Fri Jun 16 11:56:39 2017 +0100
+++ b/Makefile.inc	Tue Jun 27 14:25:09 2017 +0100
@@ -141,7 +141,7 @@
 
 $(EM_MODULE_U): $(EM_MODULE)
 		( echo "(function (factory) { if (typeof module === 'object' && typeof module.exports === 'object') { factory(module.exports); } else if (typeof define === 'function' && define.amd) { define([\"exports\"], factory); } } ) (function (exports) { \"use strict\"; exports.createLibrary = function(Module) { Module = Module || {};" > $(EM_MODULE_U) ) && \
-		tail -n +4 $(EM_MODULE) | head -n -4 >> $(EM_MODULE_U) && \
+		tail -n +4 $(EM_MODULE) | head -n $$(($$(wc -l $(EM_MODULE) | awk '{ print $$1; }') - 7)) >> $(EM_MODULE_U) && \
 		( echo ; echo "return Module; }; }); " >> $(EM_MODULE_U) )
 
 $(SO_MODULE):	$(OBJECTS)