summaryrefslogtreecommitdiffstats
path: root/conf/Makefile
blob: 853cd832a688686b48eb95627f781663d352d2a5 (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
source=cf-parse.tab.c cf-lex.c conf.c
root-rel=../

include ../Rules

conf-src=$(srcdir)/conf
conf-fragments=$(conf-src)/confbase.Y @CONFS@ $(addsuffix /config.Y,$(static-dir-paths))

ifdef DEBUG
BISON_DEBUG=-t
#FLEX_DEBUG=-d
endif

cf-parse.tab.c cf-parse-tab.h: cf-parse.y
	$(BISON) -bcf-parse -dv -pcf_ $(BISON_DEBUG) cf-parse.y

cf-parse.y: $(conf-fragments) $(conf-src)/gen_parser.m4
	$(M4) -P $(conf-src)/gen_parser.m4 $(conf-fragments) >cf-parse.y

keywords.h: $(conf-fragments) $(conf-src)/gen_keywords.m4
	$(M4) -P $(conf-src)/gen_keywords.m4 $(conf-fragments) >keywords.h

commands.h: $(conf-fragments) $(conf-src)/gen_commands.m4
	$(M4) -P $(conf-src)/gen_commands.m4 $(conf-fragments) | sort >commands.h

cf-lex.c: cf-lex.l
	$(FLEX) $(FLEX_DEBUG) -sB8 -ocf-lex.c -Pcf_ cf-lex.l

depend: keywords.h commands.h cf-parse.tab.c cf-lex.c