Makefile.in 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # Makefile for bison
  2. # Copyright (C) 1988, 1989, 1991, 1993 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. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  52. REFERENCES bison.1 bison.rnh configure.bat \
  53. bison.simple bison.hairy \
  54. LR0.c allocate.c closure.c conflicts.c derives.c \
  55. files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  56. output.c print.c reader.c reduce.c symtab.c version.c \
  57. warshall.c files.h gram.h lex.h machine.h new.h state.h \
  58. symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  59. vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  60. getopt.c getopt.h getopt1.c alloca.c mkinstalldirs
  61. SHELL = /bin/sh
  62. # This rule allows us to supply the necessary -D options
  63. # in addition to whatever the user asks for.
  64. .c.o:
  65. $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  66. # names of parser files
  67. PFILE = bison.simple
  68. PFILE1 = bison.hairy
  69. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  70. -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  71. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  72. getargs.o gram.o lalr.o lex.o \
  73. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  74. warshall.o version.o \
  75. getopt.o getopt1.o $(ALLOCA)
  76. all: bison bison.info bison.s1
  77. Makefile: Makefile.in config.status
  78. ./config.status
  79. config.status: configure
  80. ./config.status --recheck
  81. configure: configure.in
  82. cd $(srcdir); autoconf
  83. # Copy bison.simple, inserting directory name into the #line commands.
  84. bison.s1: bison.simple
  85. -rm -f bison.s1
  86. sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > bison.s1
  87. clean:
  88. rm -f *.o core bison bison.s1
  89. mostlyclean: clean
  90. distclean: clean
  91. rm -f Makefile config.status
  92. realclean: distclean
  93. rm -f TAGS *.info*
  94. # Most of these deps are in case using RCS.
  95. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
  96. $(INSTALL_PROGRAM) bison $(bindir)/bison
  97. $(INSTALL_DATA) ./bison.s1 $(datadir)/$(PFILE)
  98. $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  99. -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1)
  100. -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  101. -chmod a+r $(mandir)/bison.$(manext)
  102. cd $(srcdir); for f in bison.info*; \
  103. do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  104. # Make sure all installation directories, e.g. $(bindir) actually exist by
  105. # making them if necessary.
  106. installdirs:
  107. -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  108. uninstall:
  109. rm -f $(bindir)/bison
  110. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  111. rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  112. bison: $(OBJECTS)
  113. $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  114. dist: bison.info
  115. echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  116. -rm -rf `cat .fname`
  117. mkdir `cat .fname`
  118. dst=`cat .fname`; for f in $(DISTFILES); do \
  119. ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \
  120. done
  121. tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  122. -rm -rf `cat .fname` .fname
  123. bison.info: bison.texinfo
  124. $(MAKEINFO) $(srcdir)/bison.texinfo
  125. TAGS: *.c *.h
  126. etags *.c *.h
  127. # This file is different to pass the parser file names to the compiler.
  128. files.o: files.c
  129. $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  130. $(srcdir)/files.c $(OUTPUT_OPTION)
  131. LR0.o: system.h machine.h new.h gram.h state.h
  132. closure.o: system.h machine.h new.h gram.h
  133. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  134. derives.o: system.h new.h types.h gram.h
  135. files.o: system.h files.h new.h gram.h
  136. getargs.o: system.h files.h
  137. lalr.o: system.h machine.h types.h state.h new.h gram.h
  138. lex.o: system.h files.h symtab.h lex.h
  139. main.o: system.h machine.h
  140. nullable.o: system.h types.h gram.h new.h
  141. output.o: system.h machine.h new.h files.h gram.h state.h
  142. print.o: system.h machine.h new.h files.h gram.h state.h
  143. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  144. reduce.o: system.h machine.h files.h new.h gram.h
  145. symtab.o: system.h new.h symtab.h gram.h
  146. warshall.o: system.h machine.h
  147. # Prevent GNU make v3 from overflowing arg limit on SysV.
  148. .NOEXPORT: