Makefile.in 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. # Makefile for bison
  2. # Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
  3. # Modified (1992) from bison-1.19 by
  4. # Wilfred J. Hansen (wjh+@cmu.edu),
  5. # Andrew Consortium, Carnegie Mellon University
  6. # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD
  7. # TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  8. # AND FITNESS. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
  9. # ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12. # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13. #
  14. # This file is part of Bison, the GNU Compiler Compiler.
  15. #
  16. # Bison is free software; you can redistribute it and/or modify
  17. # it under the terms of the GNU General Public License as published by
  18. # the Free Software Foundation; either version 2, or (at your option)
  19. # any later version.
  20. #
  21. # Bison is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. # GNU General Public License for more details.
  25. #
  26. # You should have received a copy of the GNU General Public License
  27. # along with Bison; see the file COPYING. If not, write to
  28. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  29. #### Start of system configuration section. ####
  30. srcdir = @srcdir@
  31. VPATH = @srcdir@
  32. CC = @CC@
  33. INSTALL = @INSTALL@
  34. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  35. INSTALL_DATA = @INSTALL_DATA@
  36. MAKEINFO = makeinfo
  37. # Things you might add to DEFS:
  38. # -DSTDC_HEADERS If you have ANSI C headers and libraries.
  39. # -DHAVE_STRING_H If you don't have ANSI C headers but have string.h.
  40. # -DHAVE_MEMORY_H If you don't have ANSI C headers and have memory.h.
  41. # -DHAVE_STRERROR If you have strerror function.
  42. DEFS = @DEFS@
  43. CFLAGS = -g
  44. LDFLAGS = -g
  45. LIBS = @LIBS@
  46. # Some System V machines do not come with libPW. If this is true, use
  47. # the GNU alloca.o here.
  48. ALLOCA = @ALLOCA@
  49. prefix = /usr/local
  50. exec_prefix = $(prefix)
  51. # where the installed binary goes
  52. bindir = $(exec_prefix)/bin
  53. # where the parsers go
  54. datadir = $(prefix)/lib
  55. # where the info files go
  56. infodir = $(prefix)/info
  57. # where manual pages go and what their extensions should be
  58. mandir = $(prefix)/man/man$(manext)
  59. manext = 1
  60. #### End of system configuration section. ####
  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 bison.texinfo bison.info* texinfo.tex \
  70. getopt.c getopt.h getopt1.c alloca.c mkinstalldirs
  71. SHELL = /bin/sh
  72. # This rule allows us to supply the necessary -D options
  73. # in addition to whatever the user asks for.
  74. .c.o:
  75. $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  76. # names of parser files
  77. PFILE = bison.simple
  78. PFILE1 = bison.hairy
  79. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  80. -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  81. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  82. getargs.o gram.o lalr.o lex.o \
  83. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  84. warshall.o version.o \
  85. getopt.o getopt1.o $(ALLOCA)
  86. all: bison bison.info bison.s1
  87. Makefile: Makefile.in config.status
  88. ./config.status
  89. config.status: configure
  90. ./config.status --recheck
  91. configure: configure.in
  92. cd $(srcdir); autoconf
  93. # Copy bison.simple, inserting directory name into the #line commands.
  94. bison.s1: bison.simple
  95. -rm -f bison.s1
  96. sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  97. clean:
  98. rm -f *.o core bison bison.s1
  99. mostlyclean: clean
  100. distclean: clean
  101. rm -f Makefile config.status
  102. realclean: distclean
  103. rm -f TAGS *.info*
  104. # Most of these deps are in case using RCS.
  105. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  106. $(INSTALL_PROGRAM) bison $(bindir)/bison
  107. $(INSTALL_DATA) ./bison.s1 $(datadir)/$(PFILE)
  108. $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  109. -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1)
  110. -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  111. -chmod a+r $(mandir)/bison.$(manext)
  112. cd $(srcdir); for f in bison.info*; \
  113. do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  114. # Make sure all installation directories, e.g. $(bindir) actually exist by
  115. # making them if necessary.
  116. installdirs:
  117. -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  118. uninstall:
  119. rm -f $(bindir)/bison
  120. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  121. rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  122. bison: $(OBJECTS)
  123. $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  124. dist: bison.info
  125. echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  126. -rm -rf `cat .fname`
  127. mkdir `cat .fname`
  128. dst=`cat .fname`; for f in $(DISTFILES); do \
  129. ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \
  130. done
  131. tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  132. -rm -rf `cat .fname` .fname
  133. bison.info: bison.texinfo
  134. $(MAKEINFO) $(srcdir)/bison.texinfo
  135. TAGS: *.c *.h
  136. etags *.c *.h
  137. # This file is different to pass the parser file names to the compiler.
  138. files.o: files.c
  139. $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  140. $(srcdir)/files.c $(OUTPUT_OPTION)
  141. LR0.o: system.h machine.h new.h gram.h state.h
  142. closure.o: system.h machine.h new.h gram.h
  143. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  144. derives.o: system.h new.h types.h gram.h
  145. files.o: system.h files.h new.h gram.h
  146. getargs.o: system.h files.h
  147. lalr.o: system.h machine.h types.h state.h new.h gram.h
  148. lex.o: system.h files.h symtab.h lex.h
  149. main.o: system.h machine.h
  150. nullable.o: system.h types.h gram.h new.h
  151. output.o: system.h machine.h new.h files.h gram.h state.h
  152. print.o: system.h machine.h new.h files.h gram.h state.h
  153. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  154. reduce.o: system.h machine.h files.h new.h gram.h
  155. symtab.o: system.h new.h symtab.h gram.h
  156. warshall.o: system.h machine.h
  157. # Prevent GNU make v3 from overflowing arg limit on SysV.
  158. .NOEXPORT: