2 # We need this so that generated sources can find non-generated headers in a
3 # VPATH build from git.
4 AM_CPPFLAGS
+= -I
$(top_srcdir
)/queryparser
8 queryparser
/cjk-tokenizer.h\
9 queryparser
/queryparser_internal.h\
10 queryparser
/queryparser_token.h\
11 queryparser
/termgenerator_internal.h
13 lemon_built_sources
=\
14 queryparser
/queryparser_internal.
cc\
15 queryparser
/queryparser_token.h\
16 queryparser
/queryparser_internal.stamp
18 EXTRA_DIST
+= $(lemon_built_sources
)\
21 queryparser
/queryparser.lemony\
22 queryparser
/queryparser.lt
25 queryparser
/lemon
: queryparser
/lemon.c
26 $(CC_FOR_BUILD
) -o queryparser
/lemon
$(srcdir)/queryparser
/lemon.c
28 queryparser
/queryparser_internal.
cc queryparser
/queryparser_token.h
: queryparser
/queryparser_internal.stamp
29 ## Recover from the removal of $@. A full explanation of these rules is in the
30 ## automake manual under the heading "Multiple Outputs".
31 @if
test -f
$@
; then
:; else \
32 trap
'rm -rf queryparser/queryparser_internal.lock queryparser/queryparser_internal.stamp' 1 2 13 15; \
33 if mkdir queryparser
/queryparser_internal.lock
2>/dev
/null
; then \
34 rm -f queryparser
/queryparser_internal.stamp
; \
35 $(MAKE
) $(AM_MAKEFLAGS
) queryparser
/queryparser_internal.stamp
; \
36 rmdir queryparser
/queryparser_internal.lock
; \
38 while
test -d queryparser
/queryparser_internal.lock
; do sleep
1; done
; \
39 test -f queryparser
/queryparser_internal.stamp
; exit
$$?
; \
42 queryparser
/queryparser_internal.stamp
: queryparser
/queryparser.lemony queryparser
/queryparser.lt queryparser
/lemon
43 ## It's OK to directly update the output file here, since it's the stamp file
44 ## which determines whether the file is up to date.
45 queryparser
/lemon
-q
-oqueryparser
/queryparser_internal.
cc \
46 -hqueryparser
/queryparser_token.h \
47 $(srcdir)/queryparser
/queryparser.lemony
48 $(PERL
) -pi
-e
's@^(#line \d+ ").*/(queryparser/)@$$1$$2@' \
49 queryparser
/queryparser_internal.
cc
50 ## Lemon carefully avoids touching queryparser_token.h if it hasn't changed,
51 ## but only the generated file queryparser_internal.cc depends on it, so it's
52 ## better to touch it so we can have a dependency to generate it.
53 touch queryparser
/queryparser_token.h
56 BUILT_SOURCES
+= $(lemon_built_sources
)
57 CLEANFILES
+= queryparser
/lemon
61 queryparser
/cjk-tokenizer.
cc\
62 queryparser
/queryparser.
cc\
63 queryparser
/queryparser_internal.
cc\
64 queryparser
/termgenerator.
cc\
65 queryparser
/termgenerator_internal.
cc