Makefile.in 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # Makefile for bison
  2. # Copyright (C) 1984, 1989, 1991 Bob Corbett and Free Software Foundation, Inc.
  3. #
  4. # This file is part of Bison, the GNU Compiler Compiler.
  5. #
  6. # Bison is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # Bison is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with Bison; see the file COPYING. If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19. #### Start of system configuration section. ####
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22. CC = @CC@
  23. INSTALL = @INSTALL@
  24. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  25. INSTALL_DATA = @INSTALL_DATA@
  26. MAKEINFO = makeinfo
  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. CFLAGS = -g
  34. LDFLAGS = -g
  35. LIBS = @LIBS@
  36. # Some System V machines do not come with libPW. If this is true, use
  37. # the GNU alloca.o here.
  38. ALLOCA = @ALLOCA@
  39. prefix = /usr/local
  40. exec_prefix = $(prefix)
  41. # where the installed binary goes
  42. bindir = $(exec_prefix)/bin
  43. # where the parsers go
  44. datadir = $(prefix)/lib
  45. # where the info files go
  46. infodir = $(prefix)/info
  47. # where manual pages go and what their extensions should be
  48. mandir = $(prefix)/man/man$(manext)
  49. manext = 1
  50. #### End of system configuration section. ####
  51. SHELL = /bin/sh
  52. # This rule allows us to supply the necessary -D options
  53. # in addition to whatever the user asks for.
  54. .c.o:
  55. $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  56. # names of parser files
  57. PFILE = bison.simple
  58. PFILE1 = bison.hairy
  59. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  60. -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  61. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  62. getargs.o gram.o lalr.o lex.o \
  63. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  64. warshall.o version.o \
  65. getopt.o getopt1.o $(ALLOCA)
  66. all: bison bison.info bison.s1
  67. Makefile: Makefile.in config.status
  68. ./config.status
  69. config.status: configure
  70. $(srcdir)/configure --srcdir=$(srcdir) --no-create
  71. configure: configure.in
  72. cd $(srcdir); autoconf
  73. # Copy bison.simple, inserting directory name into the #line commands.
  74. bison.s1: bison.simple
  75. -rm -f bison.s1
  76. sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  77. clean:
  78. rm -f *.o core bison bison.s1
  79. mostlyclean: clean
  80. distclean: clean
  81. rm -f Makefile config.status
  82. realclean: distclean
  83. rm -f TAGS *.info*
  84. # Most of these deps are in case using RCS.
  85. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1)
  86. $(INSTALL_PROGRAM) bison $(bindir)/bison
  87. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  88. $(INSTALL_DATA) ./bison.s1 $(datadir)/$(PFILE)
  89. $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  90. -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1)
  91. -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  92. -chmod a+r $(mandir)/bison.$(manext)
  93. cd $(srcdir); for f in bison.info*; \
  94. do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  95. uninstall:
  96. rm -f $(bindir)/bison
  97. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  98. rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  99. bison: $(OBJECTS)
  100. $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  101. dist: bison.info
  102. echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  103. -rm -rf `cat .fname`
  104. mkdir `cat .fname`
  105. ln COPYING ChangeLog Makefile.in configure configure.in \
  106. REFERENCES bison.1 bison.rnh configure.bat \
  107. bison.simple bison.hairy \
  108. LR0.c allocate.c closure.c conflicts.c derives.c \
  109. files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  110. output.c print.c reader.c reduce.c symtab.c version.c \
  111. warshall.c files.h gram.h lex.h machine.h new.h state.h \
  112. symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  113. vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  114. `cat .fname`
  115. cp -p getopt.[ch] getopt1.c alloca.c `cat .fname`
  116. tar --gzip -chf `cat .fname`.tar.z `cat .fname`
  117. -rm -rf `cat .fname` .fname
  118. bison.info: bison.texinfo
  119. $(MAKEINFO) $(srcdir)/bison.texinfo
  120. TAGS: *.c *.h
  121. etags *.c *.h
  122. # This file is different to pass the parser file names to the compiler.
  123. files.o: files.c
  124. $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  125. $(srcdir)/files.c $(OUTPUT_OPTION)
  126. LR0.o: system.h machine.h new.h gram.h state.h
  127. closure.o: system.h machine.h new.h gram.h
  128. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  129. derives.o: system.h new.h types.h gram.h
  130. files.o: system.h files.h new.h gram.h
  131. getargs.o: system.h files.h
  132. lalr.o: system.h machine.h types.h state.h new.h gram.h
  133. lex.o: system.h files.h symtab.h lex.h
  134. main.o: system.h machine.h
  135. nullable.o: system.h types.h gram.h new.h
  136. output.o: system.h machine.h new.h files.h gram.h state.h
  137. print.o: system.h machine.h new.h files.h gram.h state.h
  138. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  139. reduce.o: system.h machine.h files.h new.h gram.h
  140. symtab.o: system.h new.h symtab.h gram.h
  141. warshall.o: system.h machine.h
  142. # Prevent GNU make v3 from overflowing arg limit on SysV.
  143. .NOEXPORT: