]> git.saurik.com Git - cycript.git/blobdiff - makefile
Fixed a NULL-pointer dereference on anonymous structures.
[cycript.git] / makefile
index 8ea1d3da2c834e18521b92e089a92753e89042b0..efcb4eb658cfce99be34fcc1481c3a14f5992d02 100644 (file)
--- a/makefile
+++ b/makefile
@@ -70,18 +70,21 @@ all: $(deb)
 extra::
 
 ifeq ($(depends)$(dll),dylib)
-control: control.in cycript libcycript.dylib
+control.tmp: control.in cycript libcycript.dylib
        sed -e 's/&/'"$$(dpkg-query -S $$(otool -lah cycript *.dylib | grep dylib | grep -v ':$$' | sed -e 's/^ *name //;s/ (offset [0-9]*)$$//' | sort -u) 2>/dev/null | sed -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
 else
 ifeq ($(depends)$(dll),so)
-control: control.in cycript libcycript.so
+control.tmp: control.in cycript libcycript.so
        sed -e 's/&/'"$$(dpkg-query -S $$(ldd cycript libcycript.so | sed -e '/:$$/ d; s/^[ \t]*\([^ ]* => \)\?\([^ ]*\) .*/\2/' | sort -u) 2>/dev/null | sed -e 's/:.*//; /^cycript$$/ d; s/$$/,/' | sort -u | tr '\n' ' ')"'/;s/, $$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
 else
-control: control.in
+control.tmp: control.in
        sed -e 's/&/$(foreach depend,$(depends),$(depend),)/;s/,$$//;s/#/$(svn)/;s/%/$(arch)/' $< >$@
 endif
 endif
 
+control: control.tmp
+       [[ -e control ]] && diff control control.tmp &>/dev/null || cp -pRf control.tmp control
+
 $(deb): $(all) control
        rm -rf package
        mkdir -p package/DEBIAN
@@ -139,6 +142,8 @@ package: $(deb)
 
 test: $(deb)
        dpkg -i $(deb)
-       cycript test.cy
+       if [[ -e target.cy ]]; then cycript -c target.cy && echo; fi
+       if [[ -e jquery.js ]]; then /usr/bin/time cycript -c jquery.js >jquery.cyc.js; gzip -9c jquery.cyc.js >jquery.cyc.js.gz; wc -c jquery.{mam,gcc,cyc,bak,yui}.js; wc -c jquery.{cyc,gcc,bak,mam,yui}.js.gz; fi
+       if [[ -e test.cy ]]; then cycript test.cy; fi
 
-.PHONY: all clean extra package control
+.PHONY: all clean extra package control.tmp