summaryrefslogtreecommitdiffstats
path: root/contrib/byacc/makefile.in
blob: 1701862fe2a6a3c1b3dc816266892e1e0f158434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# $Id: makefile.in,v 1.23 2014/04/09 12:15:52 tom Exp $
#
# UNIX template-makefile for Berkeley Yacc

THIS		= yacc

#### Start of system configuration section. ####

srcdir 		= @srcdir@
VPATH  		= @srcdir@

CC		= @CC@

INSTALL		= @INSTALL@
INSTALL_PROGRAM	= @INSTALL_PROGRAM@
INSTALL_DATA	= @INSTALL_DATA@
transform	= @program_transform_name@

DEFINES		=
EXTRA_CFLAGS	= @EXTRA_CFLAGS@
CPPFLAGS	= -I. -I$(srcdir) $(DEFINES) -DHAVE_CONFIG_H -DYYPATCH=`cat $(srcdir)/VERSION` @CPPFLAGS@
CFLAGS		= @CFLAGS@ $(CPPFLAGS) $(EXTRA_CFLAGS)

LDFLAGS		= @LDFLAGS@
LIBS		= @LIBS@

AWK		= @AWK@
CTAGS		= @CTAGS@
ETAGS		= @ETAGS@
LINT		= @LINT@
LINTFLAGS	= @LINT_OPTS@

prefix		= @prefix@
exec_prefix	= @exec_prefix@

datarootdir	= @datarootdir@
bindir		= $(DESTDIR)@bindir@
mandir		= $(DESTDIR)@mandir@/man1
manext		= 1

testdir		= $(srcdir)/test

SKELETON	= @SKELETON@
x		= @EXEEXT@
o		= .@OBJEXT@

#### End of system configuration section. ####

SHELL		= /bin/sh
@SET_MAKE@

H_FILES = \
	defs.h

C_FILES = \
	closure.c \
	error.c \
	graph.c \
	lalr.c \
	lr0.c \
	main.c \
	mkpar.c \
	mstring.c \
	output.c \
	reader.c \
	$(SKELETON).c \
	symtab.c \
	verbose.c \
	warshall.c

OBJS	= \
	closure$o \
	error$o \
	graph$o \
	lalr$o \
	lr0$o \
	main$o \
	mkpar$o \
	mstring$o \
	output$o \
	reader$o \
	$(SKELETON)$o \
	symtab$o \
	verbose$o \
	warshall$o

YACCPAR	= \
	btyaccpar.c \
	yaccpar.c

TRANSFORM_BIN = sed 's/$x$$//'       |sed '$(transform)'|sed 's/$$/$x/'
TRANSFORM_MAN = sed 's/$(manext)$$//'|sed '$(transform)'|sed 's/$$/$(manext)/'

actual_bin = `echo $(THIS)$x        | $(TRANSFORM_BIN)`
actual_man = `echo $(THIS).$(manext)| $(TRANSFORM_MAN)`

all : $(THIS)$x

install: all installdirs
	$(INSTALL_PROGRAM) $(THIS)$x $(bindir)/$(actual_bin)
	- $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(mandir)/$(actual_man)

installdirs:
	mkdir -p $(bindir)
	- mkdir -p $(mandir)

uninstall:
	- rm -f $(bindir)/$(actual_bin)
	- rm -f $(mandir)/$(actual_man)

################################################################################
.SUFFIXES : .c $o .i .skel

.c$o:
	@RULE_CC@
	@ECHO_CC@$(CC) -c $(CFLAGS) $<

.c.i :
	@RULE_CC@
	@ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@

.skel.c :
	$(AWK) -f $(srcdir)/skel2c $*.skel > $@

################################################################################

$(THIS)$x : $(OBJS)
	@ECHO_LD@$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)

mostlyclean :
	- rm -f core .nfs* *$o *.bak *.BAK *.out

clean :: mostlyclean
	- rm -f $(THIS)$x

distclean :: clean
	- rm -f config.log config.cache config.status config.h makefile
	- rm -f $(testdir)/yacc/test-* $(testdir)/btyacc/test-*

realclean :: distclean
	- rm -f tags TAGS

sources : $(YACCPAR)

maintainer-clean :: realclean
	rm -f $(YACCPAR)

################################################################################
check:	$(THIS)$x
	$(SHELL) $(testdir)/run_test.sh $(testdir)

check_make: $(THIS)$x
	$(SHELL) $(testdir)/run_make.sh $(testdir)

check_lint:
	$(SHELL) $(testdir)/run_lint.sh $(testdir)
################################################################################
tags: $(H_FILES) $(C_FILES) 
	$(CTAGS) $(C_FILES) $(H_FILES)

lint: $(C_FILES) 
	$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(C_FILES)

@MAKE_UPPER_TAGS@TAGS: $(H_FILES) $(C_FILES) 
@MAKE_UPPER_TAGS@	$(ETAGS) $(C_FILES) $(H_FILES)

depend:
	makedepend -- $(CPPFLAGS) -- $(C_FILES)

$(OBJS) : defs.h makefile

main$o \
$(SKELETON)$o : VERSION

# DO NOT DELETE THIS LINE -- make depend depends on it.
OpenPOWER on IntegriCloud