1## Process this file with automake to produce Makefile.in
2
3DEFINES = @DEFINES@
4INCLUDES = @INCLUDES@ @PCCTS_INCLUDES@
5
6ANTLR = @ANTLR@
7
8ANTLR_FE = err.c
9ANTLR_FH = stdpccts.h
10ANTLR_FL = parser.dlg
11ANTLR_FT = tokens.h
12PARSER = bibtex.c
13
14ANTLR_FLAGS = -gt -fe $(ANTLR_FE) -fh $(ANTLR_FH) -fl $(ANTLR_FL) -ft $(ANTLR_FT)
15ANTLR_SPAWN = $(ANTLR_FE) $(ANTLR_FH) $(ANTLR_FL) $(ANTLR_FT) $(PARSER)
16
17DLG = @DLG@
18
19DLG_FM = mode.h
20SCANNER = scan.c
21
22DLG_FLAGS = -C2 -i -m $(DLG_FM)
23DLG_SPAWN = $(DLG_FM) $(SCANNER)
24
25## delete antlr/dlg spawn at maintainer-clean
26BUILT_SOURCES = $(ANTLR_SPAWN) $(DLG_SPAWN)
27
28EXTRA_DIST = bibtex.g $(ANTLR_SPAWN) $(DLG_SPAWN) $(wildcard *.h)
29
30$(ANTLR_SPAWN): bibtex.g
31	@if [ "$(ANTLR)" = "not found" ]; then \
32	  echo "configure script could not find antlr -- cannot build $@" 2>&1 ;\
33	  exit 1; \
34	fi
35	$(ANTLR) $(ANTLR_FLAGS) bibtex.g
36
37$(DLG_SPAWN): $(ANTLR_FL)
38	@if [ "$(DLG)" = "not found" ]; then \
39	  echo "configure script could not find dlg -- cannot build $@" 2>&1 ;\
40	  exit 1; \
41	fi
42	$(DLG) $(DLG_FLAGS) $(ANTLR_FL) $(SCANNER)
43
44lib_LTLIBRARIES = libbtparse.la
45libbtparse_la_SOURCES = init.c input.c $(PARSER) $(ANTLR_FE) $(SCANNER) \
46	error.c lex_auxiliary.c parse_auxiliary.c bibtex_ast.c sym.c util.c \
47	postprocess.c macros.c traversal.c modify.c names.c tex_tree.c \
48	string_util.c format_name.c
49libbtparse_la_LIBADD = @LIBADD_DMALLOC@
50#	$(patsubst %.c,%.lo,$(PARSER) $(ANTLR_FE) $(SCANNER))
51
52# libtool versioning system (see libtool manual, section 6.2)
53#
54#   - If no interfaces changed, only implementations, increment REVISION.
55#   - If new interfaces were added, but none was removed, increment CURRENT,
56#     increment AGE, and set REVISION to 0.
57#   - If interfaces were removed (bad, as it breaks upward compatibility),
58#     increment CURRENT, set AGE and REVISION to 0.
59
60LT_CURRENT = 0
61LT_REVISION = 0
62LT_AGE = 0
63
64libbtparse_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
65
66include_HEADERS = btparse.h
67