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