srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ CFLAGS1 = @CFLAGS1@ RANLIB = @RANLIB@ # Things you might want to put in ENV: # -DERRAVAIL have utzoo-compatible error() function and friends ENV= # Things you might want to put in TEST: # -DDEBUG debugging hooks # -I. regexp.h from current directory, not /usr/include TEST=-I. -I$(srcdir) # Things you might want to put in PROF: # -pg profiler # PROF= CFLAGS=$(CFLAGS1) $(ENV) $(TEST) $(PROF) LDFLAGS=$(PROF) LIB=libregexp.a OBJ=regexp.o regsub.o regerror.o TMP=dtr.tmp default: r try: try.o $(LIB) $(CC) $(LDFLAGS) try.o $(LIB) -o try # Making timer will probably require putting stuff in $(PROF) and then # recompiling everything; the following is just the final stage. timer: timer.o $(LIB) $(CC) $(LDFLAGS) timer.o $(LIB) -o timer timer.o: timer.c timer.t.h timer.t.h: tests sed 's/ /","/g;s/\\/&&/g;s/.*/{"&"},/' tests >timer.t.h # Regression test. r: try tests ./try $@ ch.sml: ch $(BITS) smlize splitfigs splitfigs ch | soelim | smlize >$@ fig0 fig1 fig2: ch splitfigs splitfigs ch >/dev/null f: fig0 fig1 fig2 figs groff -Tps -s $(OPT) figs | lpr fig1.ps: fig0 fig1 ( cat fig0 ; echo ".LP" ; cat fig1 ) | groff -Tps $(OPT) >$@ fig2.ps: fig0 fig2 ( cat fig0 ; echo ".LP" ; cat fig2 ) | groff -Tps $(OPT) >$@ fp: fig1.ps fig2.ps r.1: regexp.c splitter splitter regexp.c rs.1: regsub.c splitter splitter regsub.c re.1: regerror.c splitter splitter regerror.c rm.h: regmagic.h splitter splitter regmagic.h re.h: regexp.h splitter splitter regexp.h PLAIN=COPYRIGHT README Makefile regexp.3 try.c timer.c tests FIX=regexp.h regexp.c regsub.c regerror.c regmagic.h DTR=$(PLAIN) $(FIX) dtr: r $(DTR) rm -rf $(TMP) mkdir $(TMP) cp $(PLAIN) $(TMP) for f in $(FIX) ; do normalize $$f >$(TMP)/$$f ; done ( cd $(TMP) ; makedtr $(DTR) ) >$@ rm -rf $(TMP) ch.ps: ch Makefile $(BITS) groff -Tps $(OPT) ch >$@ copy: ch.soe ch.sml fp makedtr REMARKS ch.sml fig*.ps ch.soe >$@ go: copy dtr