Fix off-by-one error in source position of binary operations.
[cparser] / Makefile
index acc6009..34b231f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,11 +68,16 @@ ifeq ($(findstring $(MAKECMDGOALS), clean depend),)
 -include .depend
 endif
 
+config.h:
+       cp config.h.in $@
+
 %.h:
        @true
 
-.depend: $(SOURCES)
-       @echo "#define cparser_REVISION \"`svnversion -n .`\"" > .revision.h
+REVISION ?= $(shell svnversion -n .)
+
+.depend: config.h $(SOURCES)
+       @echo "#define cparser_REVISION \"$(REVISION)\"" > .revision.h
        $(Q)if diff -Nq .revision.h revision.h > /dev/null; then \
              rm .revision.h;                                    \
            else                                                 \
@@ -115,6 +120,8 @@ builtins.h: builtins/builtins.c
        @echo '===> CREATE_BUILTINS $<'
        $(Q)./create_builtins_h.sh > $@
 
+main.c: builtins.h
+
 build/cpb/%.o: %.c build/cparser
        @echo '===> CPARSER $<'
        $(Q)./build/cparser $(CPPFLAGS) -std=c99 -Wall -g3 -c $< -o $@