--- /dev/null
+# @(#) $Header$ (LBL)
+
+SHELL = /bin/sh
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+YACC = @YACC@
+CC = @CC@
+AR = ar
+RANLIB = @RANLIB@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
+
+# If your version of "make" does not define $(MAKE), comment in the
+# definition of "MAKE" below. (You only need to do this if you intend
+# to do "make bigcheck".)
+# MAKE = make
+
+# Possible values for DEFS:
+#
+# For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
+# to DEFS.
+#
+# If your C run-time library defines malloc() as returning char*
+# instead of void*, add "-DMALLOC_TYPE=char" to DEFS. (Note that on
+# many systems, even if your malloc() returns char* you can get away
+# with skipping this step.)
+#
+# For Vax/VMS, add "-DVMS" to DEFS.
+#
+# For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
+# additional info.
+
+CFLAGS = -O
+DEFS = @DEFS@
+LDFLAGS =
+LIBS = @LIBS@
+
+# Installation targeting. Files will be installed under the tree
+# rooted at prefix. flex will be installed in bindir, libfl.a in
+# libdir, FlexLexer.h will be installed in includedir, and the manual
+# pages will be installed in mandir with extension manext.
+#
+# Raw, unformatted troff source will be installed if INSTALLMAN=man,
+# nroff preformatted versions will be installed if INSTALLMAN=cat.
+
+prefix = /usr/local
+bindir = $(prefix)/bin
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
+manext = 1
+mandir = $(prefix)/man/man$(manext)
+
+INSTALLMAN = man
+
+# You normally do not need to modify anything below this point.
+# ------------------------------------------------------------
+
+CPPFLAGS = -I. -I$(srcdir) $(DEFS)
+
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+
+HEADERS = flexdef.h version.h
+
+SOURCES = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
+ scan.l skel.c sym.c tblcmp.c yylex.c
+OBJECTS = ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o \
+ scan.o skel.o sym.o tblcmp.o yylex.o
+
+LIBSRCS = liballoc.c libmain.c libyywrap.c
+LIBOBJS = liballoc.o libmain.o libyywrap.o
+
+LINTSRCS = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c \
+ scan.c skel.c sym.c tblcmp.c yylex.c
+
+DISTFILES = README NEWS COPYING INSTALL FlexLexer.h \
+ configure.in Makefile.in mkskel.sh flex.skl \
+ $(HEADERS) $(SOURCES) $(LIBSRCS) MISC \
+ flex.1 flexdoc.1 manual \
+ configure initscan.c flex.man flexdoc.man
+
+# which "flex" to use to generate scan.c from scan.l
+FLEX = ./flex
+FLEX_FLAGS = -ipst
+COMPRESSION =
+
+FLEXLIB = libfl.a
+
+
+all: .bootstrap flex
+
+.bootstrap: initscan.c
+ @rm -f scan.c
+ cp $(srcdir)/initscan.c scan.c
+ touch .bootstrap
+
+flex: $(OBJECTS) $(FLEXLIB)
+ $(CC) $(CFLAGS) -o flex $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS)
+
+parse.c: parse.y
+ $(YACC) -d $(srcdir)/parse.y
+ @sed '/extern char.*malloc/d' <y.tab.c >parse.c
+ @rm -f y.tab.c
+ @mv y.tab.h parse.h
+
+parse.h: parse.c
+
+scan.c: scan.l
+ $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l \
+ | sed s,\"$(srcdir)/scan.l\",\"scan.l\", >scan.c
+
+scan.o: scan.c parse.h flexdef.h
+
+skel.c: flex.skl mkskel.sh
+ $(SHELL) $(srcdir)/mkskel.sh $(srcdir)/flex.skl >skel.c
+
+main.o: main.c flexdef.h version.h
+ccl.o: ccl.c flexdef.h
+dfa.o: dfa.c flexdef.h
+ecs.o: ecs.c flexdef.h
+gen.o: gen.c flexdef.h
+misc.o: misc.c flexdef.h
+nfa.o: nfa.c flexdef.h
+parse.o: parse.c flexdef.h
+skel.o: skel.c flexdef.h
+sym.o: sym.c flexdef.h
+tblcmp.o: tblcmp.c flexdef.h
+yylex.o: yylex.c flexdef.h
+
+test: check
+check: .bootstrap flex
+ ./flex $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l \
+ | sed s,\"$(srcdir)/scan.l\",\"scan.l\", \
+ | diff scan.c -
+ @echo "Check successful, using COMPRESSION=\"$(COMPRESSION)\""
+
+bigcheck:
+ rm -f scan.c ; $(MAKE) COMPRESSION="-C" check
+ rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" check
+ rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" check
+ rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" check
+ rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" check
+ rm -f scan.c ; $(MAKE)
+ @echo "All checks successful"
+
+$(FLEXLIB): $(LIBOBJS)
+ $(AR) cru $(FLEXLIB) $(LIBOBJS)
+ -$(RANLIB) $(FLEXLIB)
+
+flex.man: flex.1
+ cd $(srcdir); nroff -man flex.1 >flex.man
+
+flexdoc.man: flexdoc.1
+ cd $(srcdir); nroff -man flexdoc.1 >flexdoc.man
+
+install: flex install.$(INSTALLMAN) install-lib install-inc
+ @rm -f $(bindir)/flex
+ $(INSTALL_PROGRAM) flex $(bindir)/flex
+ @echo "NOTE: If you want to create flex++, either copy or link"
+ @echo "==== $(bindir)/flex to $(bindir)/flex++"
+
+install-lib: $(libdir) $(FLEXLIB)
+ @rm -f $(libdir)/libfl.a
+ $(INSTALL_DATA) $(FLEXLIB) $(libdir)/libfl.a
+
+install-inc:
+ @rm -f $(includedir)/FlexLexer.h
+ $(INSTALL_DATA) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h
+
+install.man: flex.1 flexdoc.1
+ @rm -f $(mandir)/flex.$(manext) $(mandir)/flexdoc.$(manext)
+ $(INSTALL_DATA) $(srcdir)/flex.1 $(mandir)/flex.$(manext)
+ $(INSTALL_DATA) $(srcdir)/flexdoc.1 $(mandir)/flexdoc.$(manext)
+
+install.cat: flex.man flexdoc.man
+ @rm -f $(mandir)/flex.$(manext) $(mandir)/flexdoc.$(manext)
+ $(INSTALL_DATA) $(srcdir)/flex.man $(mandir)/flex.$(manext)
+ $(INSTALL_DATA) $(srcdir)/flexdoc.man $(mandir)/flexdoc.$(manext)
+
+uninstall:
+ rm -f $(bindir)/flex $(bindir)/flex++
+ rm -f $libdir)/libfl.a
+ rm -f $(includedir)/FlexLexer.h
+ rm -f $(mandir)/flex.$(manext) $(mandir)/flexdoc.$(manext)
+
+tags: $(SOURCES)
+ ctags $(SOURCES)
+
+lint: $(LINTSRCS)
+ lint $(LINTSRCS) > flex.lint
+
+gcc-lint: $(LINTSRCS)
+ gcc -Dlint -Wall $(LINTSRCS) >flex.gcc-lint 2>&1
+
+mostlyclean:
+ rm -f *~ *.bak core errs
+
+clean: mostlyclean
+ rm -f flex *.o parse.c *.lint parse.h lex.yy.c $(FLEXLIB)
+
+distclean: clean
+ rm -f .bootstrap scan.c tags TAGS Makefile config.status
+
+realclean: distclean
+ rm -f flex.man flexdoc.man flex*.tar.gz
+
+dist: $(DISTFILES)
+ echo `pwd` | sed 's|.*/||' > .fname
+ rm -rf `cat .fname`
+ mkdir `cat .fname`
+ chmod 777 `cat .fname`
+ tar cf - $(DISTFILES) | (cd `cat .fname`; tar xf -)
+ @rm -f `cat .fname`/initscan.c
+ cp `cat .fname`/scan.c `cat .fname`/initscan.c
+ chmod -R a+r `cat .fname`
+ @rm -f flex.tar flex.tar.Z
+ tar chf `cat .fname`.tar `cat .fname`
+ gzip -8 `cat .fname`.tar
+ rm -rf `cat .fname` .fname
+
+Makefile: Makefile.in config.status
+ $(SHELL) config.status
+config.status: configure
+ $(SHELL) config.status --recheck
+configure: configure.in
+ cd $(srcdir); autoconf
+
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT: