makefile.in revision 235723
1# $Id: makefile.in,v 1.17 2012/01/15 19:11:21 tom Exp $
2#
3# UNIX template-makefile for Berkeley Yacc
4
5THIS		= yacc
6
7#### Start of system configuration section. ####
8
9srcdir 		= @srcdir@
10VPATH  		= @srcdir@
11
12CC		= @CC@
13
14INSTALL		= @INSTALL@
15INSTALL_PROGRAM	= @INSTALL_PROGRAM@
16INSTALL_DATA	= @INSTALL_DATA@
17transform	= @program_transform_name@
18
19DEFINES		=
20EXTRA_CFLAGS	= @EXTRA_CFLAGS@
21CPPFLAGS	= -I. -I$(srcdir) $(DEFINES) -DHAVE_CONFIG_H -DYYPATCH=`cat $(srcdir)/VERSION` @CPPFLAGS@
22CFLAGS		= @CFLAGS@ $(CPPFLAGS) $(EXTRA_CFLAGS)
23
24LDFLAGS		= @LDFLAGS@
25LIBS		= @LIBS@
26
27CTAGS		= @CTAGS@
28ETAGS		= @ETAGS@
29LINT		= @LINT@
30
31prefix		= @prefix@
32exec_prefix	= @exec_prefix@
33
34bindir		= $(DESTDIR)@bindir@
35mandir		= $(DESTDIR)@mandir@/man1
36manext		= 1
37
38testdir		= $(srcdir)/test
39
40x		= @EXEEXT@
41o		= .@OBJEXT@
42
43#### End of system configuration section. ####
44
45SHELL		= /bin/sh
46@SET_MAKE@
47
48H_FILES = \
49	defs.h
50
51C_FILES = \
52	closure.c \
53	error.c \
54	graph.c \
55	lalr.c \
56	lr0.c \
57	main.c \
58	mkpar.c \
59	output.c \
60	reader.c \
61	skeleton.c \
62	symtab.c \
63	verbose.c \
64	warshall.c
65
66OBJS	= \
67	closure$o \
68	error$o \
69	graph$o \
70	lalr$o \
71	lr0$o \
72	main$o \
73	mkpar$o \
74	output$o \
75	reader$o \
76	skeleton$o \
77	symtab$o \
78	verbose$o \
79	warshall$o
80
81TRANSFORM_BIN = sed 's/$x$$//'       |sed '$(transform)'|sed 's/$$/$x/'
82TRANSFORM_MAN = sed 's/$(manext)$$//'|sed '$(transform)'|sed 's/$$/$(manext)/'
83
84actual_bin = `echo $(THIS)$x        | $(TRANSFORM_BIN)`
85actual_man = `echo $(THIS).$(manext)| $(TRANSFORM_MAN)`
86
87all : $(THIS)$x
88
89install: all installdirs
90	$(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
91	- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)
92
93installdirs:
94	mkdir -p $(bindir)
95	- mkdir -p $(mandir)
96
97uninstall:
98	- rm -f $(bindir)/$(actual_bin)
99	- rm -f $(mandir)/$(actual_man)
100
101################################################################################
102.SUFFIXES : $o .i .html .$(manext) .cat .ps .pdf .txt
103
104.c$o:
105	@RULE_CC@
106	@ECHO_CC@$(CC) -c $(CFLAGS) $<
107
108.c.i :
109	@RULE_CC@
110	@ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
111
112.$(manext).cat :
113	- nroff -man $(srcdir)/$(THIS).$(manext) >$@
114
115.$(manext).html :
116	GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | groff -Thtml -man" >$@
117
118.$(manext).ps :
119	$(SHELL) -c "tbl $*.$(manext) | groff -man" >$@
120
121.$(manext).txt :
122	GROFF_NO_SGR=stupid $(SHELL) -c "tbl $*.$(manext) | nroff -Tascii -man | col -bx" >$@
123
124.ps.pdf :
125	ps2pdf $*.ps
126
127################################################################################
128
129$(THIS)$x : $(OBJS)
130	@ECHO_LD@$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
131
132mostlyclean :
133	- rm -f core .nfs* *$o *.bak *.BAK *.out
134
135clean : mostlyclean
136	- rm -f $(THIS)$x
137
138distclean : clean
139	- rm -f config.log config.cache config.status config.h makefile
140	- rm -f *.html *.cat *.pdf *.ps *.txt
141	- cd test && rm -f test-*
142
143realclean: distclean
144	- rm -f tags TAGS
145
146################################################################################
147docs :: $(THIS).html \
148	$(THIS).pdf \
149	$(THIS).ps \
150	$(THIS).txt
151$(THIS).html : $(THIS).$(manext)
152$(THIS).pdf : $(THIS).ps
153$(THIS).ps : $(THIS).$(manext)
154$(THIS).txt : $(THIS).$(manext)
155################################################################################
156check:	$(THIS)$x
157	$(SHELL) $(testdir)/run_test.sh $(testdir)
158
159check_make: $(THIS)$x
160	$(SHELL) $(testdir)/run_make.sh $(testdir)
161
162check_lint:
163	$(SHELL) $(testdir)/run_lint.sh $(testdir)
164################################################################################
165tags: $(H_FILES) $(C_FILES) 
166	$(CTAGS) $(C_FILES) $(H_FILES)
167
168lint: $(C_FILES) 
169	$(LINT) $(CPPFLAGS) $(C_FILES)
170
171@MAKE_UPPER_TAGS@TAGS: $(H_FILES) $(C_FILES) 
172@MAKE_UPPER_TAGS@	$(ETAGS) $(C_FILES) $(H_FILES)
173
174depend:
175	makedepend -- $(CPPFLAGS) -- $(C_FILES)
176
177$(OBJS) : defs.h
178
179main$o \
180skeleton$o : makefile VERSION
181
182# DO NOT DELETE THIS LINE -- make depend depends on it.
183