MAKEFILE.IN 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. # Things you might add to DEFS:
  27. # -DSTDC_HEADERS If you have ANSI C headers and libraries.
  28. # -DUSG If you have System V/ANSI C string and
  29. # memory functions and headers.
  30. # -DHAVE_STRERROR If you have strerror function.
  31. DEFS = @DEFS@
  32. CFLAGS = -g
  33. LDFLAGS = -g
  34. LIBS = @LIBS@
  35. # Some System V machines do not come with libPW. If this is true, use
  36. # the GNU alloca.o here.
  37. ALLOCA = @ALLOCA@
  38. prefix = /usr/local
  39. exec_prefix = $(prefix)
  40. # where the installed binary goes
  41. bindir = $(exec_prefix)/bin
  42. # where the parsers go
  43. datadir = $(prefix)/lib
  44. # where the info files go
  45. infodir = $(prefix)/info
  46. # where manual pages go and what their extensions should be
  47. mandir = $(prefix)/man/man$(manext)
  48. manext = 1
  49. #### End of system configuration section. ####
  50. SHELL = /bin/sh
  51. # This rule allows us to supply the necessary -D options
  52. # in addition to whatever the user asks for.
  53. .c.o:
  54. $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir)/../include $<
  55. # names of parser files
  56. PFILE = bison.simple
  57. PFILE1 = bison.hairy
  58. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  59. -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  60. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
  61. getargs.o gram.o lalr.o lex.o \
  62. main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
  63. warshall.o version.o \
  64. getopt.o getopt1.o $(ALLOCA)
  65. all: bison bison.info
  66. clean:
  67. rm -f *.o core bison
  68. mostlyclean: clean
  69. distclean: clean
  70. rm -f Makefile config.status
  71. realclean: distclean
  72. rm -f TAGS *.info*
  73. # Most of these deps are in case using RCS.
  74. install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1)
  75. $(INSTALL_PROGRAM) bison $(bindir)/bison
  76. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  77. # Copy bison.simple, inserting directory name into the #line commands.
  78. -rm tmp-simple
  79. sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > tmp-simple
  80. $(INSTALL_DATA) ./tmp-simple $(datadir)/$(PFILE)
  81. rm tmp-simple
  82. $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  83. -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(PFILE1)
  84. -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  85. -chmod a+r $(mandir)/bison.$(manext)
  86. for file in $(srcdir)/bison.info*; \
  87. do $(INSTALL_DATA) $$file $(infodir)/$$file; \
  88. done
  89. uninstall:
  90. rm -f $(bindir)/bison
  91. -cd $(datadir); rm -f $(PFILE) $(PFILE1)
  92. rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  93. bison: $(OBJECTS)
  94. $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  95. dist: bison.info
  96. echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  97. -rm -rf `cat .fname`
  98. mkdir `cat .fname`
  99. ln COPYING ChangeLog Makefile.in configure configure.in \
  100. REFERENCES bison.1 bison.rnh \
  101. bison.simple bison.hairy \
  102. LR0.c allocate.c closure.c conflicts.c derives.c \
  103. files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  104. output.c print.c reader.c reduce.c symtab.c version.c \
  105. warshall.c files.h gram.h lex.h machine.h new.h state.h \
  106. symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  107. vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  108. `cat .fname`
  109. cp -p getopt.[ch] getopt1.c alloca.c `cat .fname`
  110. tar chZf `cat .fname`.tar.Z `cat .fname`
  111. -rm -rf `cat .fname` .fname
  112. bison.info: bison.texinfo
  113. makeinfo $(srcdir)/bison.texinfo
  114. TAGS: *.c *.h
  115. etags *.c *.h
  116. # This file is different to pass the parser file names to the compiler.
  117. files.o: files.c
  118. $(CC) -c $(CFLAGS) $(PFILES) $(srcdir)/files.c $(OUTPUT_OPTION)
  119. LR0.o: system.h machine.h new.h gram.h state.h
  120. closure.o: system.h machine.h new.h gram.h
  121. conflicts.o: system.h machine.h new.h files.h gram.h state.h
  122. derives.o: system.h new.h types.h gram.h
  123. files.o: system.h files.h new.h gram.h
  124. getargs.o: system.h files.h
  125. lalr.o: system.h machine.h types.h state.h new.h gram.h
  126. lex.o: system.h files.h symtab.h lex.h
  127. main.o: system.h machine.h
  128. nullable.o: system.h types.h gram.h new.h
  129. output.o: system.h machine.h new.h files.h gram.h state.h
  130. print.o: system.h machine.h new.h files.h gram.h state.h
  131. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  132. reduce.o: system.h machine.h files.h new.h gram.h
  133. symtab.o: system.h new.h symtab.h gram.h
  134. warshall.o: system.h machine.h
  135. # Prevent GNU make v3 from overflowing arg limit on SysV.
  136. .NOEXPORT: