2 # Makefile for zotnet/tws subdirectory
9 top_srcdir = @top_srcdir@
16 INCLUDES = -I../.. -I$(srcdir) -I$(top_srcdir)
18 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
35 SRCS = dtime.c lexstring.c
38 OBJS = dtimep.o dtime.o lexstring.o
41 AUX = Makefile.in dtimep.lex lexedit.sed dtimep.c-lexed
43 # all files in this directory included in the distribution
44 DIST = $(HDRS) $(SRCS) $(AUX)
46 # ========= DEPENDENCIES FOR BUILDING ==========
50 # This will bomb if lex is really flex, so check
51 # file and use pre-generated version if necessary
52 dtimep.c: $(srcdir)/dtimep.c-lexed $(srcdir)/dtimep.lex $(srcdir)/lexedit.sed
53 $(LEX) -nt $(srcdir)/dtimep.lex | $(SED) -f $(srcdir)/lexedit.sed > $@
54 -@len=`wc -l $@ | $(AWK) ' { print $$1 } '`; \
55 if [ $$len -gt 500 ]; \
58 echo "LEX FAILED: using pre-lexed $@"; \
59 cp $(srcdir)/$@-lexed $@; \
62 # This needs to be generated by lex, not flex
63 dtimep.c-lexed: $(srcdir)/dtimep.lex $(srcdir)/lexedit.sed
64 $(LEX) -nt $(srcdir)/dtimep.lex | $(SED) -f $(srcdir)/lexedit.sed > $(srcdir)/$@
70 # ========== DEPENDENCIES FOR CLEANUP ==========
86 # ========== DEPENDENCIES FOR MAINTENANCE ==========
90 Makefile: Makefile.in ../../config.status
91 cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
93 distdir = ../../`cat ../../distname`/$(subdir)
95 @echo "Copying distribution files in $(subdir)"
96 @for file in $(DIST); do \
97 cp -p $(srcdir)/$$file $(distdir); \