]> git.saurik.com Git - bison.git/blame - Makefile.in
Insert `_' macro around many string constants.
[bison.git] / Makefile.in
CommitLineData
5ec13303 1# Makefile for bison
516ef771 2# Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
5ec13303
RS
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
ac89deb7
RS
38CFLAGS = @CFLAGS@
39LDFLAGS = @LDFLAGS@
5ec13303
RS
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
f590489e 47prefix = @prefix@
2bb7b13a 48exec_prefix = @exec_prefix@
5ec13303
RS
49
50# where the installed binary goes
51bindir = $(exec_prefix)/bin
52
53# where the parsers go
22a1e99f 54datadir = $(prefix)/share
5ec13303
RS
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
a83994ff
NF
65DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
66 REFERENCES bison.1 bison.rnh configure.bat \
67 bison.simple bison.hairy \
68 LR0.c allocate.c closure.c conflicts.c derives.c \
69 files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
70 output.c print.c reader.c reduce.c symtab.c version.c \
71 warshall.c files.h gram.h lex.h machine.h new.h state.h \
72 symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
318476e1 73 vmshlp.mar README INSTALL NEWS bison.texinfo bison.info* texinfo.tex \
ef3536eb 74 getopt.c getopt.h getopt1.c alloca.c mkinstalldirs install-sh
a83994ff
NF
75
76
5ec13303
RS
77SHELL = /bin/sh
78
79# This rule allows us to supply the necessary -D options
80# in addition to whatever the user asks for.
81.c.o:
82 $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
83
84# names of parser files
85PFILE = bison.simple
86PFILE1 = bison.hairy
87
88PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
89 -DXPFILE1=\"$(datadir)/$(PFILE1)\"
90
91OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o \
92 getargs.o gram.o lalr.o lex.o \
93 main.o nullable.o output.o print.o reader.o reduce.o symtab.o \
94 warshall.o version.o \
95 getopt.o getopt1.o $(ALLOCA)
96
97all: bison bison.info bison.s1
98
ac89deb7
RS
99Makefile: config.status Makefile.in
100 CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
9df81dd3
NF
101
102config.status: configure
511f8050 103 ./config.status --recheck
9df81dd3
NF
104
105configure: configure.in
ac89deb7 106 cd $(srcdir) && autoconf
9df81dd3 107
5ec13303
RS
108# Copy bison.simple, inserting directory name into the #line commands.
109bison.s1: bison.simple
4951b477 110 -rm -f bison.s1
ac89deb7
RS
111 sed -e "/^#line/ s|bison|$(datadir)/bison|" < $(srcdir)/$(PFILE) > $@-tmp
112 mv $@-tmp $@
5ec13303
RS
113
114clean:
ac89deb7 115 rm -f *.o core bison bison.s1 config.status config.log
5ec13303
RS
116
117mostlyclean: clean
118
119distclean: clean
ac89deb7 120 rm -f Makefile
5ec13303
RS
121
122realclean: distclean
123 rm -f TAGS *.info*
124
125# Most of these deps are in case using RCS.
6d215e11 126install: all bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) installdirs uninstall
5ec13303 127 $(INSTALL_PROGRAM) bison $(bindir)/bison
02826fb8 128 $(INSTALL_DATA) bison.s1 $(datadir)/$(PFILE)
5ec13303 129 $(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
5ec13303
RS
130 cd $(srcdir); for f in bison.info*; \
131 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
02826fb8 132 -$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
5ec13303 133
5fc7e107
NF
134# Make sure all installation directories, e.g. $(bindir) actually exist by
135# making them if necessary.
136installdirs:
965f6134 137 -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
5fc7e107 138
5ec13303
RS
139uninstall:
140 rm -f $(bindir)/bison
141 -cd $(datadir); rm -f $(PFILE) $(PFILE1)
142 rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
143
d47a732a
NF
144check:
145 @echo "No checks implemented (yet)."
146
5ec13303 147bison: $(OBJECTS)
57df1c86 148 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
5ec13303 149
687621a5
RS
150# We don't use $(srcdir) in this rule
151# because it is normally used in the master source dir
152# in which configure has not been run.
5ec13303
RS
153dist: bison.info
154 echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
155 -rm -rf `cat .fname`
156 mkdir `cat .fname`
a83994ff 157 dst=`cat .fname`; for f in $(DISTFILES); do \
687621a5 158 ln $$f $$dst/$$f || { echo copying $$f; cp -p $$f $$dst/$$f ; } \
a83994ff 159 done
ef650659 160 tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
5ec13303
RS
161 -rm -rf `cat .fname` .fname
162
163bison.info: bison.texinfo
164 $(MAKEINFO) $(srcdir)/bison.texinfo
165
166TAGS: *.c *.h
167 etags *.c *.h
168
169# This file is different to pass the parser file names to the compiler.
170files.o: files.c
171 $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
172 $(srcdir)/files.c $(OUTPUT_OPTION)
173
174LR0.o: system.h machine.h new.h gram.h state.h
55bcd09a 175allocate.o: system.h
5ec13303
RS
176closure.o: system.h machine.h new.h gram.h
177conflicts.o: system.h machine.h new.h files.h gram.h state.h
178derives.o: system.h new.h types.h gram.h
179files.o: system.h files.h new.h gram.h
180getargs.o: system.h files.h
181lalr.o: system.h machine.h types.h state.h new.h gram.h
182lex.o: system.h files.h symtab.h lex.h
183main.o: system.h machine.h
184nullable.o: system.h types.h gram.h new.h
185output.o: system.h machine.h new.h files.h gram.h state.h
186print.o: system.h machine.h new.h files.h gram.h state.h
187reader.o: system.h files.h new.h symtab.h lex.h gram.h
188reduce.o: system.h machine.h files.h new.h gram.h
189symtab.o: system.h new.h symtab.h gram.h
190warshall.o: system.h machine.h
191
192# Prevent GNU make v3 from overflowing arg limit on SysV.
193.NOEXPORT: