summaryrefslogtreecommitdiff
path: root/src/options/Makefile.am
blob: f89fca922cf45dbe48b0857bd9a56c90f7fb9aec (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
OPTIONS_FILES_SRCS = \
	base_options.cpp \
	base_options.h \
	../expr/options.cpp \
	../expr/options.h \
	../theory/booleans/options.cpp \
	../theory/booleans/options.h \
	../theory/options.cpp \
	../theory/options.h \
	../theory/bv/options.cpp \
	../theory/bv/options.h \
	../theory/datatypes/options.cpp \
	../theory/datatypes/options.h \
	../theory/builtin/options.cpp \
	../theory/builtin/options.h \
	../theory/arith/options.cpp \
	../theory/arith/options.h \
	../theory/uf/options.cpp \
	../theory/uf/options.h \
	../theory/arrays/options.cpp \
	../theory/arrays/options.h \
	../theory/quantifiers/options.cpp \
	../theory/quantifiers/options.h \
	../theory/rewriterules/options.cpp \
	../theory/rewriterules/options.h \
	../prop/options.cpp \
	../prop/options.h \
	../proof/options.cpp \
	../proof/options.h \
	../printer/options.cpp \
	../printer/options.h \
	../smt/options.cpp \
	../smt/options.h \
	../decision/options.cpp \
	../decision/options.h \
	../main/options.cpp \
	../main/options.h \
	../parser/options.cpp \
	../parser/options.h

OPTIONS_FILES = \
	$(patsubst %.cpp,%,$(filter %.cpp,$(OPTIONS_FILES_SRCS)))

AM_CPPFLAGS = \
	-D__BUILDING_CVC4LIB \
	-I@srcdir@/../include -I@srcdir@/.. -I@builddir@/..
AM_CXXFLAGS = -Wall $(FLAG_VISIBILITY_HIDDEN)

noinst_LTLIBRARIES = liboptions.la

liboptions_la_SOURCES = \
	options.h \
	base_options_handlers.h \
	option_exception.h

nodist_liboptions_la_SOURCES = \
	options.cpp \
	options_holder.h \
	base_options.cpp \
	base_options.h \
	../expr/options.cpp \
	../expr/options.h \
	../theory/booleans/options.cpp \
	../theory/booleans/options.h \
	../theory/options.cpp \
	../theory/options.h \
	../theory/bv/options.cpp \
	../theory/bv/options.h \
	../theory/datatypes/options.cpp \
	../theory/datatypes/options.h \
	../theory/builtin/options.cpp \
	../theory/builtin/options.h \
	../theory/arith/options.cpp \
	../theory/arith/options.h \
	../theory/uf/options.cpp \
	../theory/uf/options.h \
	../theory/arrays/options.cpp \
	../theory/arrays/options.h \
	../theory/quantifiers/options.cpp \
	../theory/quantifiers/options.h \
	../theory/rewriterules/options.cpp \
	../theory/rewriterules/options.h \
	../prop/options.cpp \
	../prop/options.h \
	../proof/options.cpp \
	../proof/options.h \
	../printer/options.cpp \
	../printer/options.h \
	../smt/options.cpp \
	../smt/options.h \
	../decision/options.cpp \
	../decision/options.h \
	../main/options.cpp \
	../main/options.h \
	../parser/options.cpp \
	../parser/options.h

BUILT_SOURCES = \
	exprs-builts \
	../smt/smt_options.cpp \
	options.cpp \
	options_holder.h

CLEANFILES = \
	$(OPTIONS_FILES_SRCS) \
	$(BUILT_SOURCES) \
	options-stamp

EXTRA_DIST = \
	mkoptions \
	base_options_template.h \
	base_options_template.cpp \
	options_template.cpp \
	options_holder_template.h \
	options.i \
	option_exception.i \
	$(OPTIONS_FILES)

if CVC4_DEBUG
# listing Debug_tags too ensures that make doesn't auto-remove it
# after building (if it does, we don't get the "cached" effect with
# the .tmp files below, and we have to re-compile and re-link each
# time, even when there are no changes).
BUILT_SOURCES += \
	Debug_tags.h \
	Debug_tags
endif
if CVC4_TRACING
# listing Trace_tags too ensures that make doesn't auto-remove it
# after building (if it does, we don't get the "cached" effect with
# the .tmp files below, and we have to re-compile and re-link each
# time, even when there are no changes).
BUILT_SOURCES += \
	Trace_tags.h \
	Trace_tags
endif
%_tags.h: %_tags
	$(AM_V_GEN)( \
	  echo 'static char const* const $^[] = {'; \
	  for tag in `cat $^`; do \
	    echo "\"$$tag\","; \
	  done; \
	  echo 'NULL'; \
	  echo '};' \
	) >"$@"

# This .tmp business is to keep from having to re-compile options.cpp
# (and then re-link the libraries) if nothing has changed.
%_tags: %_tags.tmp
	$(AM_V_GEN)\
	diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true
# .PHONY ensures the .tmp version is always rebuilt (to check for any changes)
.PHONY: Debug_tags.tmp Trace_tags.tmp
# The "sed" invocation below is particularly obnoxious, but it works around
# inconsistencies in REs on different platforms, using only a basic regular
# expression (no |, no \<, ...).
Debug_tags.tmp Trace_tags.tmp:
	$(AM_V_GEN)\
	grep '\<$(@:_tags.tmp=)\(\.isOn\)* *( *\".*\" *)' \
		`find @srcdir@/../ -name "*.cpp" -or -name "*.h" -or -name "*.cc" -or -name "*.g"` | \
	sed 's/^$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | LC_ALL=C sort | uniq >"$@"

MOSTLYCLEANFILES = \
	Debug_tags \
	Trace_tags \
	Debug_tags.tmp \
	Trace_tags.tmp \
	Debug_tags.h \
	Trace_tags.h

options_holder.h options.cpp ../smt/smt_options.cpp $(OPTIONS_FILES_SRCS): options-stamp
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)
	$(AM_V_at)chmod +x @srcdir@/mkoptions
	$(AM_V_GEN)(@srcdir@/mkoptions \
		@srcdir@/options_holder_template.h @builddir@/options_holder.h \
		@srcdir@/options_template.cpp @builddir@/options.cpp \
		@srcdir@/../smt/smt_options_template.cpp @builddir@/../smt/smt_options.cpp \
		@top_builddir@/doc/cvc4.1_template @top_builddir@/doc/cvc4.1 \
		-t \
		@srcdir@/base_options_template.h @srcdir@/base_options_template.cpp \
		$(foreach o,$(OPTIONS_FILES),"$(srcdir)/$(o)" "$(patsubst %/,%,$(dir $(o)))") \
	)
	touch "$@"

$(OPTIONS_FILES):;

# This rule is ugly.  It's needed to ensure that automake's dependence
# includes are available during distclean, even though they come from
# directories that are cleaned first.  Without this rule, "distclean"
# fails.
%.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@"

.PHONY: exprs-builts
exprs-builts:; $(AM_V_at)[ "$(FROM_EXPR)" != 1 ] && $(MAKE) -C ../expr builts || true
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback