merged golden
[cvc5.git] / src / options / Makefile.am
1 OPTIONS_FILES_SRCS = \
2 base_options.cpp \
3 base_options.h \
4 ../expr/options.cpp \
5 ../expr/options.h \
6 ../theory/booleans/options.cpp \
7 ../theory/booleans/options.h \
8 ../theory/options.cpp \
9 ../theory/options.h \
10 ../theory/bv/options.cpp \
11 ../theory/bv/options.h \
12 ../theory/datatypes/options.cpp \
13 ../theory/datatypes/options.h \
14 ../theory/builtin/options.cpp \
15 ../theory/builtin/options.h \
16 ../theory/arith/options.cpp \
17 ../theory/arith/options.h \
18 ../theory/uf/options.cpp \
19 ../theory/uf/options.h \
20 ../theory/arrays/options.cpp \
21 ../theory/arrays/options.h \
22 ../theory/quantifiers/options.cpp \
23 ../theory/quantifiers/options.h \
24 ../theory/rewriterules/options.cpp \
25 ../theory/rewriterules/options.h \
26 ../theory/strings/options.cpp \
27 ../theory/strings/options.h \
28 ../prop/options.cpp \
29 ../prop/options.h \
30 ../proof/options.cpp \
31 ../proof/options.h \
32 ../printer/options.cpp \
33 ../printer/options.h \
34 ../smt/options.cpp \
35 ../smt/options.h \
36 ../decision/options.cpp \
37 ../decision/options.h \
38 ../main/options.cpp \
39 ../main/options.h \
40 ../parser/options.cpp \
41 ../parser/options.h \
42 ../theory/idl/options.cpp \
43 ../theory/idl/options.h
44
45 OPTIONS_FILES = \
46 $(patsubst %.cpp,%,$(filter %.cpp,$(OPTIONS_FILES_SRCS)))
47
48 AM_CPPFLAGS = \
49 -D__BUILDING_CVC4LIB \
50 -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/..
51 AM_CXXFLAGS = -Wall $(FLAG_VISIBILITY_HIDDEN)
52
53 noinst_LTLIBRARIES = liboptions.la
54
55 liboptions_la_SOURCES = \
56 options.h \
57 base_options_handlers.h \
58 option_exception.h
59
60 nodist_liboptions_la_SOURCES = \
61 options.cpp \
62 options_holder.h \
63 base_options.cpp \
64 base_options.h \
65 ../expr/options.cpp \
66 ../expr/options.h \
67 ../theory/booleans/options.cpp \
68 ../theory/booleans/options.h \
69 ../theory/options.cpp \
70 ../theory/options.h \
71 ../theory/bv/options.cpp \
72 ../theory/bv/options.h \
73 ../theory/datatypes/options.cpp \
74 ../theory/datatypes/options.h \
75 ../theory/builtin/options.cpp \
76 ../theory/builtin/options.h \
77 ../theory/arith/options.cpp \
78 ../theory/arith/options.h \
79 ../theory/uf/options.cpp \
80 ../theory/uf/options.h \
81 ../theory/arrays/options.cpp \
82 ../theory/arrays/options.h \
83 ../theory/quantifiers/options.cpp \
84 ../theory/quantifiers/options.h \
85 ../theory/rewriterules/options.cpp \
86 ../theory/rewriterules/options.h \
87 ../theory/strings/options.cpp \
88 ../theory/strings/options.h \
89 ../prop/options.cpp \
90 ../prop/options.h \
91 ../proof/options.cpp \
92 ../proof/options.h \
93 ../printer/options.cpp \
94 ../printer/options.h \
95 ../smt/options.cpp \
96 ../smt/options.h \
97 ../decision/options.cpp \
98 ../decision/options.h \
99 ../main/options.cpp \
100 ../main/options.h \
101 ../parser/options.cpp \
102 ../parser/options.h \
103 ../theory/idl/options.cpp \
104 ../theory/idl/options.h
105
106 BUILT_SOURCES = \
107 exprs-builts \
108 ../smt/smt_options.cpp \
109 options.cpp \
110 options_holder.h
111
112 CLEANFILES = \
113 $(OPTIONS_FILES_SRCS) \
114 $(BUILT_SOURCES) \
115 options-stamp
116
117 EXTRA_DIST = \
118 mkoptions \
119 base_options_template.h \
120 base_options_template.cpp \
121 options_template.cpp \
122 options_holder_template.h \
123 options.i \
124 option_exception.i \
125 $(OPTIONS_FILES) \
126 options-stamp \
127 ../smt/smt_options.cpp \
128 options.cpp \
129 options_holder.h \
130 $(OPTIONS_FILES_SRCS)
131
132 if CVC4_DEBUG
133 # listing Debug_tags too ensures that make doesn't auto-remove it
134 # after building (if it does, we don't get the "cached" effect with
135 # the .tmp files below, and we have to re-compile and re-link each
136 # time, even when there are no changes).
137 BUILT_SOURCES += \
138 Debug_tags.h \
139 Debug_tags
140 endif
141 if CVC4_TRACING
142 # listing Trace_tags too ensures that make doesn't auto-remove it
143 # after building (if it does, we don't get the "cached" effect with
144 # the .tmp files below, and we have to re-compile and re-link each
145 # time, even when there are no changes).
146 BUILT_SOURCES += \
147 Trace_tags.h \
148 Trace_tags
149 endif
150 %_tags.h: %_tags
151 $(AM_V_GEN)( \
152 echo 'static char const* const $^[] = {'; \
153 for tag in `cat $^`; do \
154 echo "\"$$tag\","; \
155 done; \
156 echo 'NULL'; \
157 echo '};' \
158 ) >"$@"
159
160 # This .tmp business is to keep from having to re-compile options.cpp
161 # (and then re-link the libraries) if nothing has changed.
162 %_tags: %_tags.tmp
163 $(AM_V_GEN)\
164 diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true
165 # .PHONY ensures the .tmp version is always rebuilt (to check for any changes)
166 .PHONY: Debug_tags.tmp Trace_tags.tmp
167 # The "sed" invocation below is particularly obnoxious, but it works around
168 # inconsistencies in REs on different platforms, using only a basic regular
169 # expression (no |, no \<, ...).
170 Debug_tags.tmp Trace_tags.tmp:
171 $(AM_V_GEN)\
172 grep '\<$(@:_tags.tmp=)\(\.isOn\)* *( *\".*\" *)' \
173 `find @srcdir@/../ -name "*.cpp" -o -name "*.h" -o -name "*.cc" -o -name "*.g"` | \
174 sed 's/^$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | LC_ALL=C sort | uniq >"$@"
175
176 MOSTLYCLEANFILES = \
177 Debug_tags \
178 Trace_tags \
179 Debug_tags.tmp \
180 Trace_tags.tmp \
181 Debug_tags.h \
182 Trace_tags.h
183
184 options_holder.h options.cpp ../smt/smt_options.cpp $(OPTIONS_FILES_SRCS): options-stamp
185 options-stamp: options_holder_template.h options_template.cpp ../smt/smt_options_template.cpp base_options_template.h base_options_template.cpp mkoptions $(OPTIONS_FILES)
186 $(AM_V_at)chmod +x @srcdir@/mkoptions
187 $(AM_V_GEN)(@srcdir@/mkoptions \
188 @srcdir@/options_holder_template.h @builddir@/options_holder.h \
189 @srcdir@/options_template.cpp @builddir@/options.cpp \
190 @srcdir@/../smt/smt_options_template.cpp @builddir@/../smt/smt_options.cpp \
191 @top_builddir@/doc/cvc4.1_template @top_builddir@/doc/cvc4.1 \
192 @top_builddir@/doc/libcvc4.3_template @top_builddir@/doc/libcvc4.3 \
193 @top_builddir@/doc/SmtEngine.3cvc_template @top_builddir@/doc/SmtEngine.3cvc \
194 @top_builddir@/doc/options.3cvc_template @top_builddir@/doc/options.3cvc \
195 -t \
196 @srcdir@/base_options_template.h @srcdir@/base_options_template.cpp \
197 $(foreach o,$(OPTIONS_FILES),"$(srcdir)/$(o)" "$(patsubst %/,%,$(dir $(o)))") \
198 )
199 touch "$@"
200
201 $(OPTIONS_FILES):;
202
203 # This rule is ugly. It's needed to ensure that automake's dependence
204 # includes are available during distclean, even though they come from
205 # directories that are cleaned first. Without this rule, "distclean"
206 # fails.
207 %.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@"
208
209 .PHONY: exprs-builts
210 exprs-builts:; $(AM_V_at)[ "$(FROM_EXPR)" != 1 ] && $(MAKE) -C ../expr builts || true