summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/extra/gen/Makefile
blob: 2e952e2215fa58f3237774c6368c9501a2e435fa (plain) (blame)
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
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# gen/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.



LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
YLWRAP = ../aux-build/ylwrap
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
LEX = flex
LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
SHELL = /bin/bash
YACC = bison -y
YFLAGS = 

PARSER_PREFIX = libconfig_yy
BUILT_SOURCES = scanner.c scanner.h grammar.c grammar.h
AM_YFLAGS = -d -p $(PARSER_PREFIX)
AM_LFLAGS = --nounistd --header-file=scanner.h --prefix=$(PARSER_PREFIX)

all: $(BUILT_SOURCES)
	@patch -p1 < clangwarnings.patch

.SUFFIXES: .c .l .y

grammar.h: grammar.c
	@if test ! -f $@; then \
	  rm -f grammar.c; \
	  $(MAKE) grammar.c; \
	else :; fi
	

distclean-compile:
	-rm -f *.tab.c

scanner.h: scanner.c

.l.c:
	$(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)

.y.c:
	$(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)

clean:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
	-rm -f grammar.c
	-rm -f grammar.h
	-rm -f scanner.c
	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)

distclean: clean distclean-compile

.MAKE: all

.PHONY: all clean \
	distclean \
	distclean-compile