From: Peter Verthez Date: Sun, 2 Dec 2001 14:02:12 +0000 (+0000) Subject: Add dmalloc testability. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f112d9051302c0bffa505148e55981b954d30dcf;p=gedcom-parse.git Add dmalloc testability. Run the parse twice over each file. --- diff --git a/Makefile b/Makefile index db56b46..2422c16 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,12 @@ YACC=bison LEX=flex -CFLAGS=-g -W -Wall -pedantic +DMALLOC_CFLAGS= +DMALLOC_LOADLIBES= +CFLAGS=-g -W -Wall -pedantic $(DMALLOC_CFLAGS) YFLAGS=--debug --defines LFLAGS=-8 +LOADLIBES=$(DMALLOC_LOADLIBES) all: ansel_module gedcom_parse @@ -33,6 +36,7 @@ lex.gedcom_lohi_.c: gedcom_lohi.lex gedcom.tab.h gedcom.h multilex.h \ gedcom.tab.c gedcom.tab.h: gedcom.y gedcom.h $(YACC) $(YFLAGS) --name-prefix=gedcom_ gedcom.y +.PHONY: clean clean: rm -f core gedcom_parse lexer_* *.o lex.gedcom_* \ gedcom.tab.* gedcom.output @@ -73,5 +77,9 @@ test: all @export GCONV_PATH=./ansel; \ for file in t/*.ged; do \ echo "=== testing $$file"; \ - ./gedcom_parse $$file; \ + ./gedcom_parse -2 $$file; \ done + +testmem: DMALLOC_CFLAGS=-DMALLOC +testmem: DMALLOC_LOADLIBES=-ldmalloc +testmem: clean test