1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = 1.4
LIBS=
YFLAGS = -dv
CFLAGS = @CFLAGS@ @STRTOLL@ @STRTOULL@
noinst_HEADERS = exgram.h exlib.h expr.h
noinst_LTLIBRARIES = libexpr.la
man_MANS = expr.3
libexpr_la_SOURCES = excc.c excontext.c exdata.c exerror.c exeval.c \
exexpr.c exlexname.c exopen.c exrewind.c extoken.c extype.c \
exzero.c exparse.y exgram.h exlib.h expr.h
INCLUDES = \
-I$(top_srcdir)/tools/vmalloc \
-I$(top_srcdir)/tools/sfio \
-I$(top_srcdir)/tools/ast \
-I$(top_srcdir)/cdt
excc.o excc.lo: exparse.h
exparse.o exparse.lo: exparse.c exgram.h
exeval.o exeval.lo exlexname.o exlexname.lo: exop.h
exparse.c exparse.h: exparse.y
$(YACC) -dtv exparse.y
$(SED) "s/yy/ex/g" < y.tab.c | $(SED) "s/YY/EX/g" > tmp
$(SED) "s/fprintf(/sfprintf(sfstderr,/g" < tmp > exparse.c
echo "#ifndef _EXPARSE_H" > exparse.h
echo "#define _EXPARSE_H" >> exparse.h
$(SED) "s/yy/ex/g" < y.tab.h | $(SED) "s/YY/EX/g" >> exparse.h
echo "#endif /* _EXPARSE_H */" >> exparse.h
rm -f tmp y.tab.c y.tab.h
exop.h: exparse.h
echo "static const char* exop[] = {" > exop.h
$(SED) -e '/^[ ]*#[ ]*define[ ][ ]*[A-Z]/!d' -e 's/^[ ]*#[ ]*define[ ]*\([A-Z0-9_]*\).*/ "\1",/' < exparse.h >> exop.h
echo "};" >> exop.h
CLEANFILES = y.output exparse.[ch]
EXTRA_DIST = $(man_MANS) RELEASE Makefile.nmake Makefile.orig Makefile.IN
|