home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / bison-1.25-base.tgz / bison-1.25-base.tar / fsf / bison / Makefile.in < prev    next >
Makefile  |  1996-05-11  |  6KB  |  192 lines

  1. # Makefile for bison
  2. # Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
  3. # This file is part of Bison, the GNU Compiler Compiler.
  4. # Bison is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # Bison is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with Bison; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. #### Start of system configuration section. ####
  17.  
  18. srcdir = @srcdir@
  19. VPATH = @srcdir@
  20.  
  21. CC = @CC@
  22. INSTALL = @INSTALL@
  23. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  24. INSTALL_DATA = @INSTALL_DATA@
  25. MAKEINFO = makeinfo
  26.  
  27. # Things you might add to DEFS:
  28. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  29. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  30. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  31. # -DHAVE_STRERROR    If you have strerror function.
  32. DEFS = @DEFS@
  33.  
  34. CFLAGS = -g
  35. LDFLAGS =
  36.  
  37. LIBS = @LIBS@
  38.  
  39. # Some System V machines do not come with libPW.  If this is true, use
  40. # the GNU alloca.o here.
  41. ALLOCA = @ALLOCA@
  42.  
  43. prefix = @prefix@
  44. exec_prefix = @exec_prefix@
  45.  
  46. # where the installed binary goes
  47. bindir = $(exec_prefix)/bin
  48.  
  49. # where the parsers go
  50. datadir = $(prefix)/share
  51.  
  52. # where the info files go
  53. infodir = $(prefix)/info
  54.  
  55. # where manual pages go and what their extensions should be
  56. mandir = $(prefix)/man/man$(manext)
  57. manext = 1
  58.  
  59. #### End of system configuration section. ####
  60.  
  61. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  62.     REFERENCES bison.1 bison.rnh configure.bat \
  63.     bison.simple bison.hairy \
  64.     LR0.c allocate.c closure.c conflicts.c derives.c \
  65.     files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  66.     output.c print.c reader.c reduce.c symtab.c version.c \
  67.     warshall.c files.h gram.h lex.h machine.h new.h state.h \
  68.     symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  69.     vmshlp.mar README INSTALL NEWS bison.texinfo bison.info* texinfo.tex \
  70.     getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install-sh
  71.  
  72.  
  73. SHELL = /bin/sh
  74.  
  75. # This rule allows us to supply the necessary -D options
  76. # in addition to whatever the user asks for.
  77. .c.o:
  78.     $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  79.  
  80. # names of parser files
  81. PFILE = bison.simple
  82. PFILE1 = bison.hairy
  83.  
  84. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  85.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  86.  
  87. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  88.       getargs.o gram.o lalr.o lex.o                    \
  89.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  90.       warshall.o version.o                        \
  91.       getopt.o getopt1.o $(ALLOCA)
  92.  
  93. all: bison bison.info bison.s1
  94.  
  95. Makefile: Makefile.in config.status
  96.     ./config.status
  97.  
  98. config.status: configure
  99.     ./config.status --recheck
  100.  
  101. configure: configure.in
  102.     cd $(srcdir); autoconf
  103.  
  104. # Copy bison.simple, inserting directory name into the #line commands.
  105. bison.s1: bison.simple
  106.     -rm -f bison.s1
  107.     sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  108.  
  109. clean:
  110.     rm -f *.o core bison bison.s1
  111.  
  112. mostlyclean: clean
  113.  
  114. distclean: clean
  115.     rm -f Makefile config.status
  116.  
  117. realclean: distclean
  118.     rm -f TAGS *.info*
  119.  
  120. # Most of these deps are in case using RCS.
  121. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  122.     $(INSTALL_PROGRAM) bison $(bindir)/bison
  123.     $(INSTALL_DATA) bison.s1 $(datadir)/$(PFILE)
  124.     $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  125.     cd $(srcdir); for f in bison.info*; \
  126.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  127.     -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  128.  
  129. # Make sure all installation directories, e.g. $(bindir) actually exist by
  130. # making them if necessary.
  131. installdirs:
  132.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  133.  
  134. uninstall:
  135.     rm -f $(bindir)/bison
  136.     -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  137.     rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  138.  
  139. check:
  140.     @echo "No checks implemented (yet)."
  141.  
  142. bison: $(OBJECTS)
  143.     $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
  144.  
  145. # We don't use $(srcdir) in this rule
  146. # because it is normally used in the master source dir
  147. # in which configure has not been run.
  148. dist: bison.info
  149.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  150.     -rm -rf `cat .fname`
  151.     mkdir `cat .fname`
  152.     dst=`cat .fname`; for f in $(DISTFILES); do \
  153.        ln $$f $$dst/$$f || { echo copying $$f; cp -p $$f $$dst/$$f ; } \
  154.     done
  155.     tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  156.     -rm -rf `cat .fname` .fname
  157.  
  158. bison.info: bison.texinfo
  159.     $(MAKEINFO) $(srcdir)/bison.texinfo
  160.  
  161. TAGS: *.c *.h
  162.     etags *.c *.h
  163.  
  164. # This file is different to pass the parser file names to the compiler.
  165. files.o: files.c
  166.     $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  167.        $(srcdir)/files.c $(OUTPUT_OPTION)
  168.  
  169. LR0.o: system.h machine.h new.h gram.h state.h
  170. closure.o: system.h machine.h new.h gram.h
  171. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  172. derives.o: system.h new.h types.h gram.h
  173. files.o: system.h files.h new.h gram.h
  174. getargs.o: system.h files.h
  175. lalr.o: system.h machine.h types.h state.h new.h gram.h
  176. lex.o: system.h files.h symtab.h lex.h
  177. main.o: system.h machine.h
  178. nullable.o: system.h types.h gram.h new.h
  179. output.o: system.h machine.h new.h files.h gram.h state.h
  180. print.o: system.h machine.h new.h files.h gram.h state.h
  181. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  182. reduce.o: system.h machine.h files.h new.h gram.h
  183. symtab.o: system.h new.h symtab.h gram.h
  184. warshall.o: system.h machine.h
  185.  
  186. # Prevent GNU make v3 from overflowing arg limit on SysV.
  187. .NOEXPORT:
  188.