1# This file is part of grecs - Gray's Extensible Configuration System 2# Copyright (C) 2007-2019 Sergey Poznyakoff 3# 4# Grecs is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# the Free Software Foundation; either version 3, or (at your option) 7# any later version. 8# 9# Grecs is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with Grecs. If not, see <http://www.gnu.org/licenses/>. 16 17PARSER_DEFS = 18 19if GRECS_COND_META1_PARSER 20 GRECS_PARSER_META1 = meta1-gram.y meta1-lex.l 21 GRECS_EXTRA_META1 = meta1-gram.h 22 PARSER_DEFS += -DENABLE_META1_PARSER 23endif 24 25if GRECS_COND_BIND_PARSER 26 GRECS_PARSER_BIND = bind-gram.y bind-lex.l 27 GRECS_EXTRA_BIND = bind-gram.h 28 PARSER_DEFS += -DENABLE_BIND_PARSER 29endif 30 31if GRECS_COND_DHCPD_PARSER 32 GRECS_PARSER_DHCPD = dhcpd-gram.y dhcpd-lex.l 33 GRECS_EXTRA_DHCPD = dhcpd-gram.h 34 PARSER_DEFS += -DENABLE_DHCPD_PARSER 35endif 36 37if GRECS_COND_GIT_PARSER 38 GRECS_PARSER_GIT = git-parser.c 39 PARSER_DEFS += -DENABLE_GIT_PARSER 40endif 41 42if GRECS_COND_JSON 43 GRECS_JSON = json-gram.y json-lex.l jsonfmt.c 44 GRECS_EXTRA_JSON = json-gram.h 45endif 46 47GRECS_SRC = \ 48 asprintf.c\ 49 assert.c\ 50 cidr.c\ 51 diag.c\ 52 format.c\ 53 grecs-gram.y\ 54 grecs-lex.l\ 55 ipstr.c\ 56 join.c\ 57 lineacc.c\ 58 list.c\ 59 lookup.c\ 60 mem.c\ 61 opthelp.c\ 62 parser.c\ 63 parsertab.c\ 64 path-parser.c\ 65 preproc.c\ 66 sort.c\ 67 symtab.c\ 68 text.c\ 69 tree.c\ 70 txtacc.c\ 71 version.c\ 72 $(GRECS_JSON)\ 73 $(GRECS_PARSER_BIND)\ 74 $(GRECS_PARSER_DHCPD)\ 75 $(GRECS_PARSER_GIT)\ 76 $(GRECS_PARSER_META1) 77 78VPATH += $(top_srcdir)/@GRECS_SUBDIR@/wordsplit 79NODIST_GRECS_SRC = wordsplit.c 80 81if GRECS_COND_SOCKADDR_LIST 82 GRECS_SRC += sockaddr.c 83endif 84 85EXTRA_DIST=\ 86 grecs-gram.h\ 87 $(GRECS_EXTRA_BIND)\ 88 $(GRECS_EXTRA_DHCPD)\ 89 $(GRECS_EXTRA_JSON)\ 90 $(GRECS_EXTRA_META1)\ 91 $(PP_SETUP_FILE)\ 92 Make.am Make-inst.am Make-shared.am Make-static.am 93 94AM_CPPFLAGS = \ 95 -I$(srcdir)\ 96 -I$(top_srcdir)/@GRECS_SUBDIR@\ 97 @GRECS_INCLUDES@\ 98 @GRECS_HOST_PROJECT_INCLUDES@\ 99 $(PARSER_DEFS) 100AM_YFLAGS = -dtv 101AM_LFLAGS = -d 102 103incdir=$(pkgdatadir)/$(VERSION)/include 104inc_DATA = $(PP_SETUP_FILE) 105 106LEXCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(LEX) $(LFLAGS) $(AM_LFLAGS)' 107YACCCOMPILE = $(top_srcdir)/@GRECS_SUBDIR@/build-aux/yyrename '$(YACC) $(YFLAGS) $(AM_YFLAGS)' 108 109 110 111 112