]> git.saurik.com Git - cycript.git/blobdiff - Makefile.am
Implement all of the crazy ECMAScript octal stuff.
[cycript.git] / Makefile.am
index b9e7b643c36db9ea185f2f89311e5cfb22659b0a..76f44b2aaf30ceb8be6e2d70e5ba05648fff4d36 100644 (file)
@@ -28,6 +28,8 @@ ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS = -DYYDEBUG=1
 AM_CPPFLAGS += -include config.h -include $(srcdir)/unconfig.h
 
+AM_OBJCXXFLAGS = -fobjc-exceptions
+
 CY_LDFLAGS = -no-undefined -avoid-version -export-dynamic
 
 lib_LTLIBRARIES = 
@@ -97,13 +99,14 @@ Cycript.l: Cycript.l.in
 
 CLEANFILES += lex.cy.cpp
 lex.cy.cpp: Cycript.l
-       $(FLEX) -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/' >$@
+       $(FLEX) -b -t $< | $(SED) -e 's/int yyl;/yy_size_t yyl;/;s/int yyleng_r;/yy_size_t yyleng_r;/;s/yyg =/yyg __attribute__((__unused__)) =/' >$@
+       grep -F 'No backing up.' lex.backup >/dev/null
 
 Console.$(OBJEXT) Cycript.tab.lo Driver.lo Handler.lo Highlight.lo Library.lo lex.cy.lo: Cycript.tab.hh
 
 CLEANFILES += Cycript.tab.cc Cycript.tab.hh stack.hh Cycript.output
 Cycript.tab.cc Cycript.tab.hh stack.hh Cycript.output: Cycript.yy
-       $(BISON) -v --report=state $<
+       $(BISON) -v --report=state -Werror $<
        ! grep -n '^State [0-9]* conflicts:' Cycript.output
        ! grep -n '^ *$$default  reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep 'shift, and go to state [0-9]*$$'
        ! grep -n '^ *$$default  reduce using rule [0-9]* (Lex[A-Z][^)]*)$$' Cycript.output -B 2 | grep -v '$$default' | grep 'reduce using rule [0-9]* ([^)]*)$$'