home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / bison-1.25-src.tgz / tar.out / fsf / bison / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  7KB  |  218 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. TEXI2DVI = texi2dvi
  27. DVIPS = dvips
  28.  
  29. # Things you might add to DEFS:
  30. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  31. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  32. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  33. # -DHAVE_STRERROR    If you have strerror function.
  34. DEFS = @DEFS@
  35.  
  36. CFLAGS = @CFLAGS@
  37. LDFLAGS = @LDFLAGS@
  38.  
  39. LIBS = @LIBS@
  40.  
  41. # Some System V machines do not come with libPW.  If this is true, use
  42. # the GNU alloca.o here.
  43. ALLOCA = @ALLOCA@
  44.  
  45. prefix = @prefix@
  46. exec_prefix = @exec_prefix@
  47.  
  48. # where the installed binary goes
  49. bindir = $(exec_prefix)/bin
  50.  
  51. # where the parsers go
  52. datadir = $(prefix)/share
  53.  
  54. # where the info files go
  55. infodir = $(prefix)/info
  56.  
  57. # where the guide files go
  58. guidedir = $(prefix)/guide
  59.  
  60. # where the dvi files go
  61. dvidir = $(prefix)/dvi
  62.  
  63. # where the ps files go
  64. psdir = $(prefix)/ps
  65.  
  66. # where manual pages go and what their extensions should be
  67. mandir = $(prefix)/man/man$(manext)
  68. manext = 1
  69.  
  70. #### End of system configuration section. ####
  71.  
  72. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  73.     REFERENCES bison.1 bison.rnh configure.bat \
  74.     bison.simple bison.hairy \
  75.     LR0.c allocate.c closure.c conflicts.c derives.c \
  76.     files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  77.     output.c print.c reader.c reduce.c symtab.c version.c \
  78.     warshall.c files.h gram.h lex.h machine.h new.h state.h \
  79.     symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  80.     vmshlp.mar README INSTALL NEWS bison.texinfo bison.info* \
  81.     bison.guide bison.dvi bison.ps \
  82.     texinfo.tex getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install-sh
  83.  
  84.  
  85. SHELL = /bin/sh
  86.  
  87. # This rule allows us to supply the necessary -D options
  88. # in addition to whatever the user asks for.
  89. # ADE-local: Removed -I$(srcdir)/../include since it points nowhere.
  90. .c.o:
  91.     $(CC) -c $(DEFS) $(CPPFLAGS) $(CFLAGS) $<
  92.  
  93. # names of parser files
  94. PFILE = bison.simple
  95. PFILE1 = bison.hairy
  96.  
  97. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  98.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  99.  
  100. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  101.       getargs.o gram.o lalr.o lex.o                    \
  102.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  103.       warshall.o version.o                        \
  104.       getopt.o getopt1.o $(ALLOCA)
  105.  
  106. all: bison bison.info bison.s1 bison.guide bison.dvi bison.ps
  107.  
  108. Makefile: Makefile.in config.status
  109.     ./config.status
  110.  
  111. config.status: configure
  112.     ./config.status --recheck
  113.  
  114. configure: configure.in
  115.     cd $(srcdir); autoconf
  116.  
  117. # Copy bison.simple, inserting directory name into the #line commands.
  118. bison.s1: bison.simple
  119.     -rm -f bison.s1
  120.     sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  121.  
  122. clean:
  123.     rm -f *.o core bison bison.s1
  124.  
  125. mostlyclean: clean
  126.  
  127. distclean: clean
  128.     rm -f Makefile config.status
  129.  
  130. realclean: distclean
  131.     rm -f TAGS *.info* *.guide *.dvi *.ps
  132.  
  133. # Most of these deps are in case using RCS.
  134. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  135.     $(INSTALL_PROGRAM) bison $(bindir)/bison
  136.     $(INSTALL_DATA) bison.s1 $(datadir)/$(PFILE)
  137.     $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  138.     for f in bison.info*; \
  139.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  140.     $(INSTALL_DATA) bison.guide $(guidedir)/bison.guide
  141.     $(INSTALL_DATA) bison.dvi $(dvidir)/bison.dvi
  142.     $(INSTALL_DATA) bison.ps $(psdir)/bison.ps
  143.     $(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  144.  
  145. # Make sure all installation directories, e.g. $(bindir) actually exist by
  146. # making them if necessary.
  147. installdirs:
  148.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(guidedir) $(mandir) $(dvidir) $(psdir)
  149.  
  150. uninstall:
  151.     rm -f $(bindir)/bison
  152.     -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  153.     rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  154.     rm -f $(guidedir)/bison.guide $(dvidir)/bison.dvi $(psdir)/bison.ps
  155.  
  156. check:
  157.     @echo "No checks implemented (yet)."
  158.  
  159. bison: $(OBJECTS)
  160.     $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
  161.  
  162. # We don't use $(srcdir) in this rule
  163. # because it is normally used in the master source dir
  164. # in which configure has not been run.
  165. dist: bison.info bison.guide bison.dvi bison.ps
  166.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  167.     -rm -rf `cat .fname`
  168.     mkdir `cat .fname`
  169.     dst=`cat .fname`; for f in $(DISTFILES); do \
  170.        ln $$f $$dst/$$f || { echo copying $$f; cp -p $$f $$dst/$$f ; } \
  171.     done
  172.     tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  173.     -rm -rf `cat .fname` .fname
  174.  
  175. bison.info: bison.texinfo
  176.     $(MAKEINFO) -I$(srcdir) $(srcdir)/bison.texinfo -o $@
  177.  
  178. bison.guide: bison.texinfo
  179.     $(MAKEINFO) --amiga $(srcdir)/bison.texinfo -o $@
  180.  
  181. bison.dvi: bison.texinfo
  182.     $(TEXI2DVI) $?
  183.  
  184. bison.ps: bison.dvi
  185.     $(DVIPS) -o $@ $?
  186.  
  187. TAGS: *.c *.h
  188.     etags *.c *.h
  189.  
  190. # This file is different to pass the parser file names to the compiler.
  191. files.o: files.c
  192.     $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  193.        $(srcdir)/files.c $(OUTPUT_OPTION)
  194.  
  195. LR0.o: system.h machine.h new.h gram.h state.h
  196. closure.o: system.h machine.h new.h gram.h
  197. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  198. derives.o: system.h new.h types.h gram.h
  199. files.o: system.h files.h new.h gram.h
  200. getargs.o: system.h files.h
  201. lalr.o: system.h machine.h types.h state.h new.h gram.h
  202. lex.o: system.h files.h symtab.h lex.h
  203. main.o: system.h machine.h
  204. nullable.o: system.h types.h gram.h new.h
  205. output.o: system.h machine.h new.h files.h gram.h state.h
  206. print.o: system.h machine.h new.h files.h gram.h state.h
  207. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  208. reduce.o: system.h machine.h files.h new.h gram.h
  209. symtab.o: system.h new.h symtab.h gram.h
  210. warshall.o: system.h machine.h
  211.  
  212. # Prevent GNU make v3 from overflowing arg limit on SysV.
  213. .NOEXPORT:
  214.