home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / flex-2.4.6-src.lha / src / amiga / flex-2.4.6 / Makefile.in < prev    next >
Makefile  |  1994-06-12  |  7KB  |  248 lines

  1. # @(#) $Header: Makefile.in,v 1.2 94/01/04 14:33:19 vern Exp $ (LBL)
  2.  
  3. # If your version of "make" does not define $(MAKE), comment in the
  4. # definition of "MAKE" below.  (You only need to do this if you intend
  5. # to do "make bigcheck" or "make dist".)
  6. # MAKE = make
  7.  
  8. # Possible values for DEFS:
  9. #
  10. # For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
  11. # to DEFS.
  12. #
  13. # For Vax/VMS, add "-DVMS" to DEFS.
  14. #
  15. # For MS-DOS, add "-DMS_DOS" to DEFS.  See the directory MISC/MSDOS for
  16. # additional info.
  17.  
  18. CFLAGS = -O
  19. DEFS = @DEFS@
  20. LDFLAGS = 
  21. LIBS = @LIBS@
  22.  
  23. # Installation targeting.  Files will be installed under the tree
  24. # rooted at prefix.  flex will be installed in bindir, libfl.a in
  25. # libdir, FlexLexer.h will be installed in includedir, and the manual
  26. # pages will be installed in mandir with extension manext.
  27. # Raw, unformatted troff source will be installed if INSTALLMAN=man,
  28. # nroff preformatted versions will be installed if INSTALLMAN=cat.
  29.  
  30. prefix = /gnu
  31. exec_prefix = $(prefix)
  32. bindir = $(exec_prefix)/bin
  33. libdir = $(exec_prefix)/lib
  34. includedir = $(prefix)/include
  35. manext = 1
  36. mandir = $(prefix)/man/man$(manext)
  37.  
  38. INSTALLMAN = man
  39.  
  40. SHELL = /bin/sh
  41. srcdir = @srcdir@
  42. VPATH = @srcdir@
  43.  
  44. # For the Amiga, force LN_S to be just "cp" rather than "ln -s", so that a
  45. # copy is made rather than a symbolic link.  We support symbolic links, but
  46. # we don't want to use them in the installation because the "mkisofs" CD-ROM
  47. # mastering software doesn't know what to do with them yet (convert to a
  48. # copy on the fly).
  49. #LN_S = @LN_S@
  50. LN_S = cp
  51. YACC = @YACC@
  52. CC = @CC@
  53. AR = ar
  54. RANLIB = @RANLIB@
  55. INSTALL = @INSTALL@
  56. INSTALL_DATA = @INSTALL_DATA@
  57. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  58.  
  59. # You normally do not need to modify anything below this point.
  60. # ------------------------------------------------------------
  61.  
  62. CPPFLAGS = -I. -I$(srcdir) $(DEFS)
  63.  
  64. .c.o:
  65.     $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  66.  
  67. HEADERS = flexdef.h version.h
  68.  
  69. SOURCES = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
  70.     scan.l skel.c sym.c tblcmp.c yylex.c
  71. OBJECTS = ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o \
  72.     scan.o skel.o sym.o tblcmp.o yylex.o @ALLOCA@
  73.  
  74. LIBSRCS = libmain.c libyywrap.c
  75. LIBOBJS = libmain.o libyywrap.o
  76.  
  77. LINTSRCS = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c \
  78.     scan.c skel.c sym.c tblcmp.c yylex.c
  79.  
  80. DISTFILES = README NEWS COPYING INSTALL FlexLexer.h \
  81.     configure.in Makefile.in mkskel.sh flex.skl \
  82.     $(HEADERS) $(SOURCES) $(LIBSRCS) MISC \
  83.     flex.1 flexdoc.1 \
  84.     scan.c install.sh mkinstalldirs configure
  85.  
  86. DIST_NAME = flex
  87.  
  88. # which "flex" to use to generate scan.c from scan.l
  89. FLEX = ./flex
  90. FLEX_FLAGS = -ist $(PERF_REPORT)
  91. COMPRESSION =
  92. PERF_REPORT = -p
  93.  
  94. FLEXLIB = libfl.a
  95.  
  96.  
  97. all: flex
  98.  
  99. flex: .bootstrap $(OBJECTS) $(FLEXLIB)
  100.     $(CC) $(CFLAGS) -o flex $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS)
  101.  
  102. .bootstrap: initscan.c
  103.     @rm -f scan.c
  104.     cp $(srcdir)/initscan.c scan.c
  105.     touch .bootstrap
  106.  
  107. parse.c: parse.y
  108.     $(YACC) -d $(srcdir)/parse.y
  109.     @sed '/extern char.*malloc/d' <y.tab.c >parse.c
  110.     @rm -f y.tab.c
  111.     @mv y.tab.h parse.h
  112.  
  113. parse.h: parse.c
  114.  
  115. scan.c: scan.l
  116.     $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l >scan.tmp
  117.     sed s,\"$(srcdir)/scan.l\",\"scan.l\", <scan.tmp >scan.c
  118.     @rm scan.tmp
  119.  
  120. scan.o: scan.c parse.h flexdef.h
  121. yylex.o: yylex.c parse.h flexdef.h
  122.  
  123. skel.c: flex.skl mkskel.sh
  124.     $(SHELL) $(srcdir)/mkskel.sh $(srcdir)/flex.skl >skel.c
  125.  
  126. main.o: main.c flexdef.h version.h
  127. ccl.o: ccl.c flexdef.h
  128. dfa.o: dfa.c flexdef.h
  129. ecs.o: ecs.c flexdef.h
  130. gen.o: gen.c flexdef.h
  131. misc.o: misc.c flexdef.h
  132. nfa.o: nfa.c flexdef.h
  133. parse.o: parse.c flexdef.h
  134. skel.o: skel.c flexdef.h
  135. sym.o: sym.c flexdef.h
  136. tblcmp.o: tblcmp.c flexdef.h
  137.  
  138. alloca.o: alloca.c
  139.     $(CC) $(CPPFLAGS) $(CFLAGS) -c -Dxmalloc=yy_flex_xmalloc alloca.c
  140.  
  141. alloca.c: $(srcdir)/MISC/alloca.c
  142.     @rm -f alloca.c
  143.     cp $(srcdir)/MISC/alloca.c .
  144.  
  145. test: check
  146. check: flex
  147.     ./flex $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l \
  148.     | sed s,\"$(srcdir)/scan.l\",\"scan.l\", \
  149.     | diff scan.c -
  150.     @echo "Check successful, using COMPRESSION=\"$(COMPRESSION)\""
  151.  
  152. bigcheck:
  153.     rm -f scan.c ; $(MAKE) COMPRESSION="-C" check
  154.     rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" check
  155.     rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" check
  156.     rm -f scan.c ; $(MAKE) COMPRESSION="-Cfea" check
  157.     rm -f scan.c ; $(MAKE) COMPRESSION="-CFer" check
  158.     rm -f scan.c ; $(MAKE) COMPRESSION="-l" PERF_REPORT="" check
  159.     rm -f scan.c ; $(MAKE)
  160.     @echo "All checks successful"
  161.  
  162. $(FLEXLIB): $(LIBOBJS)
  163.     $(AR) cru $(FLEXLIB) $(LIBOBJS)
  164.     -$(RANLIB) $(FLEXLIB)
  165.  
  166. flex.man: flex.1
  167.     cd $(srcdir); nroff -man flex.1 >flex.man
  168.  
  169. flexdoc.man: flexdoc.1
  170.     cd $(srcdir); nroff -man flexdoc.1 >flexdoc.man
  171.  
  172. install: flex $(FLEXLIB) installdirs install.$(INSTALLMAN)
  173.     $(INSTALL_PROGRAM) flex $(bindir)/flex
  174.     @rm -f $(bindir)/flex++
  175.     cd $(bindir); $(LN_S) flex flex++
  176.     $(INSTALL_DATA) $(FLEXLIB) $(libdir)/libfl.a
  177.     -cd $(libdir); $(RANLIB) libfl.a
  178.     $(INSTALL_DATA) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h
  179.  
  180. install.man: flex.1 flexdoc.1
  181.     $(INSTALL_DATA) $(srcdir)/flex.1 $(mandir)/flex.$(manext)
  182.     $(INSTALL_DATA) $(srcdir)/flexdoc.1 $(mandir)/flexdoc.$(manext)
  183.  
  184. install.cat: flex.man flexdoc.man
  185.     $(INSTALL_DATA) $(srcdir)/flex.man $(mandir)/flex.$(manext)
  186.     $(INSTALL_DATA) $(srcdir)/flexdoc.man $(mandir)/flexdoc.$(manext)
  187.  
  188. installdirs:
  189.     $(SHELL) $(srcdir)/mkinstalldirs \
  190.       $(bindir) $(libdir) $(includedir) $(mandir)
  191.  
  192. uninstall:
  193.     rm -f $(bindir)/flex $(bindir)/flex++
  194.     rm -f $(libdir)/libfl.a
  195.     rm -f $(includedir)/FlexLexer.h
  196.     rm -f $(mandir)/flex.$(manext) $(mandir)/flexdoc.$(manext)
  197.  
  198. tags: $(SOURCES)
  199.     ctags $(SOURCES)
  200.  
  201. TAGS: $(SOURCES)
  202.     etags $(SOURCES)
  203.  
  204. lint: $(LINTSRCS)
  205.     lint -Dconst= $(LINTSRCS) > flex.lint
  206.  
  207. gcc-lint: $(LINTSRCS)
  208.     gcc -Dlint -Wall $(LINTSRCS) >flex.gcc-lint 2>&1
  209.  
  210. mostlyclean:
  211.     rm -f *~ a.out *.bak core errs scan.tmp
  212.  
  213. clean: mostlyclean
  214.     rm -f parse.c parse.h *.o alloca.c *.lint lex.yy.c lex.yy.cc $(FLEXLIB)
  215.  
  216. distclean: clean
  217.     rm -f .bootstrap flex scan.c tags TAGS Makefile config.status
  218.  
  219. realclean: distclean
  220.     rm -f flex.man flexdoc.man flex*.tar.gz flex*.tar.Z
  221.  
  222. dist: flex $(DISTFILES)
  223.     $(MAKE) DIST_NAME=flex-`sed <version.h 's/[^"]*"//' | sed 's/"//'` dist2
  224.  
  225. dist2:
  226.     @rm -rf $(DIST_NAME)
  227.     @rm -f $(DIST_NAME).tar $(DIST_NAME).tar.Z $(DIST_NAME).tar.gz
  228.     @mkdir $(DIST_NAME)
  229.     tar cf - $(DISTFILES) | (cd $(DIST_NAME); tar xfB -)
  230.     @mv $(DIST_NAME)/scan.c $(DIST_NAME)/initscan.c
  231.     @chmod 444 $(DIST_NAME)/initscan.c
  232.     @chmod +w $(DIST_NAME)/Makefile.in
  233.     tar chf $(DIST_NAME).tar $(DIST_NAME)
  234.     compress <$(DIST_NAME).tar >$(DIST_NAME).tar.Z
  235.     gzip <$(DIST_NAME).tar >$(DIST_NAME).tar.gz
  236.     @rm $(DIST_NAME).tar
  237.  
  238. Makefile: Makefile.in config.status
  239.     $(SHELL) config.status
  240. config.status: configure
  241.     $(SHELL) config.status --recheck
  242. configure: configure.in
  243.     cd $(srcdir); autoconf
  244.  
  245. # Prevent GNU make v3 from overflowing arg limit on SysV.
  246. .NOEXPORT:
  247.