-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.builds.in
230 lines (216 loc) · 8.53 KB
/
Makefile.builds.in
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# -*- makefile -*-
#
# This Makefile produces the Makefile in the top-level builds/
# directory for standard-path builds (e.g., those configured from the
# source tree). It has some autoconf cruft in it, documented below.
#
# Its main purposes are to:
# 1. build the current build profile
# 2. install into "builds/$(CURRENT_BUILD)/$(prefix)"
# 3. set up "builds/$(CURRENT_BUILD)/{bin,lib}" symlinks
# 4. install into "builds/$(prefix)"
# 5. set up "builds/bin" and "builds/lib"
#
# Steps 2 and 4 require libtool-relinking for dynamically-linked
# executables and libraries, since build/bin is not the final
# installation path.
# Include the "current" build profile.
include current
# Set up $(MAKE)
@SET_MAKE@
# Set up some basic autoconf make vars
srcdir = @srcdir@
builddir = @builddir@
install_sh = @install_sh@
mkinstalldirs = $(install_sh) -d
exec_prefix = @exec_prefix@
prefix = @prefix@
bindir = @bindir@
libdir = @libdir@
abs_builddir = @abs_builddir@
distdir = @PACKAGE@-@VERSION@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
SHELL = @SHELL@
LIBTOOL = $(CURRENT_BUILD)/libtool
# Are we building the libcvc4compat library ?
CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@
# Are we building static/dynamic libraries/binaries? One or the other can be
# on, or both.
BUILDING_STATIC = @BUILDING_STATIC@
BUILDING_SHARED = @BUILDING_SHARED@
STATIC_BINARY = @STATIC_BINARY@
# @
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
# mkinstalldirs (never prefix with @; not a top-level instruction)
AM_V_mkdir_noat = $(am__v_mkdir_noat_$(V))
am__v_mkdir_noat_ = $(am__v_mkdir_noat_$(AM_DEFAULT_VERBOSITY))
am__v_mkdir_noat_0 = $(SHELL) -c 'echo " MKDIR $$@"; $(mkinstalldirs) "$$@"' bash
am__v_mkdir_noat_1 = $(mkinstalldirs)
# mkinstalldirs (can prefix with @)
AM_V_mkdir = $(am__v_mkdir_$(V))
am__v_mkdir_ = $(am__v_mkdir_$(AM_DEFAULT_VERBOSITY))
am__v_mkdir_0 = @$(am__v_mkdir_noat_0)
am__v_mkdir_1 = $(am__v_mkdir_noat_1)
# libtool --mode=install $(install_sh)
AM_V_ltinstall = $(am__v_ltinstall_$(V))
am__v_ltinstall_ = $(am__v_ltinstall_$(AM_DEFAULT_VERBOSITY))
am__v_ltinstall_0 = @$(SHELL) -c 'echo " LTINS $$1"; $(LIBTOOL) --silent --mode=install $(install_sh) "$$@"' bash
am__v_ltinstall_1 = $(LIBTOOL) --mode=install $(install_sh)
# install_sh (never prefix with @)
AM_V_install_sh_noat = $(am__v_install_sh_noat_$(V))
am__v_install_sh_noat_ = $(am__v_install_sh_noat_$(AM_DEFAULT_VERBOSITY))
am__v_install_sh_noat_0 = $(SHELL) -c 'echo " INSTL $$1"; $(install_sh) "$$@"' bash
am__v_install_sh_noat_1 = $(install_sh)
# relinking
AM_V_relink = $(am__v_relink_$(V))
am__v_relink_ = $(am__v_relink_$(AM_DEFAULT_VERBOSITY))
am__v_relink_0 = echo " RELNK"
am__v_relink_1 = :
# all the binaries that might need to be installed
# (it's not a fatal error for one/some don't exist in a given build
# configuration)
CVC4_BINARIES = cvc4 pcvc4
.PHONY: _default_build_ all examples
_default_build_: all
all:
# build the current build profile
$(AM_V_at)(cd $(CURRENT_BUILD) && $(MAKE) $@)
# set up builds/$(CURRENT_BUILD)/...prefix.../bin
# and builds/$(CURRENT_BUILD)/...prefix.../lib
$(AM_V_mkdir) "$(CURRENT_BUILD)$(bindir)"
$(AM_V_mkdir) "$(CURRENT_BUILD)$(libdir)"
# install libcvc4
$(AM_V_ltinstall) $(CURRENT_BUILD)/src/libcvc4.la \
"$(abs_builddir)$(libdir)"
# install libcvc4parser
$(AM_V_ltinstall) $(CURRENT_BUILD)/src/parser/libcvc4parser.la \
"$(abs_builddir)$(libdir)"
ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
# install libcvc4compat
$(CURRENT_BUILD)/libtool --mode=install $(install_sh) \
$(CURRENT_BUILD)/src/compat/libcvc4compat.la \
"$(abs_builddir)$(libdir)"
endif
ifeq ($(BUILDING_SHARED)$(STATIC_BINARY),10)
# if we're building shared libs and the binary is not static, relink
# the handling with empty $relink_command is a hack for Mac OS
$(AM_V_at)thelibdir="$(abs_builddir)$(libdir)"; \
progdir="$(abs_builddir)$(bindir)"; for file in $(CVC4_BINARIES); do \
if test -r $(CURRENT_BUILD)/src/main/$$file; then \
eval `grep '^relink_command=' $(CURRENT_BUILD)/src/main/$$file | sed 's:-Wl,-rpath:-Wl,-rpath -Wl,\\\\$$thelibdir -Wl,-rpath:'`; \
if test -z "$$relink_command"; then \
$(AM_V_mkdir_noat) "$(CURRENT_BUILD)$(bindir)/.libs"; \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/.libs/$$file \
"$(abs_builddir)$(bindir)/.libs"; \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/$$file \
"$(abs_builddir)$(bindir)"; \
else \
$(AM_V_relink) "$$file"; eval "(cd $(CURRENT_BUILD)/src/main && $$relink_command)"; \
fi; \
else \
rm -f "$(abs_builddir)$(bindir)/$$file"; \
fi; \
done
else
# if we're building static libs only, just install the driver binary directly
$(AM_V_at)for file in $(CVC4_BINARIES); do \
if test -r $(CURRENT_BUILD)/src/main/$$file; then \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/$$file \
"$(abs_builddir)$(bindir)"; \
else \
rm -f "$(abs_builddir)$(bindir)/$$file"; \
fi; \
done
endif
# set up builds/$(CURRENT_BUILD)/bin and builds/$(CURRENT_BUILD)/lib
$(AM_V_at)test -e $(CURRENT_BUILD)/lib || ln -sf "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/lib
$(AM_V_at)test -e $(CURRENT_BUILD)/bin || ln -sf "$(abs_builddir)$(bindir)" $(CURRENT_BUILD)/bin
# set up builds/...prefix.../bin and builds/...prefix.../lib
$(AM_V_mkdir) ".$(bindir)"
$(AM_V_mkdir) ".$(libdir)"
# install libcvc4
$(AM_V_ltinstall) $(CURRENT_BUILD)/src/libcvc4.la "`pwd`$(libdir)"
# install libcvc4parser
$(AM_V_ltinstall) $(CURRENT_BUILD)/src/parser/libcvc4parser.la "`pwd`$(libdir)"
ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
# install libcvc4compat
$(CURRENT_BUILD)/libtool --mode=install $(install_sh) $(CURRENT_BUILD)/src/compat/libcvc4compat.la "`pwd`$(libdir)"
endif
ifeq ($(BUILDING_SHARED)$(STATIC_BINARY),10)
# if we're building shared libs and the binary is not static, relink
# the handling with empty $relink_command is a hack for Mac OS
$(AM_V_at)thelibdir="`pwd`$(libdir)"; progdir="`pwd`$(bindir)"; for file in $(CVC4_BINARIES); do \
if test -r $(CURRENT_BUILD)/src/main/$$file; then \
eval `grep '^relink_command=' $(CURRENT_BUILD)/src/main/$$file | sed 's:-Wl,-rpath:-Wl,-rpath -Wl,\\\\$$thelibdir -Wl,-rpath:'`; \
if test -z "$$relink_command"; then \
$(AM_V_mkdir_noat) ".$(bindir)/.libs"; \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/.libs/$$file \
"`pwd`$(bindir)/.libs"; \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/$$file \
"`pwd`$(bindir)"; \
else \
$(AM_V_relink) "$$file"; eval "(cd $(CURRENT_BUILD)/src/main && $$relink_command)"; \
fi; \
else \
rm -f "`pwd`$(bindir)/$$file"; \
fi; \
done
else
# if we're building static libs only, just install the driver binary directly
$(AM_V_at)for file in $(CVC4_BINARIES); do \
if test -r $(CURRENT_BUILD)/src/main/$$file; then \
$(AM_V_install_sh_noat) \
$(CURRENT_BUILD)/src/main/$$file \
"`pwd`$(bindir)"; \
else \
rm -f "`pwd`$(bindir)/$$file"; \
fi; \
done
endif
# set up builds/bin and builds/lib
$(AM_V_at)test -e lib || ln -sf ".$(libdir)" lib
$(AM_V_at)test -e bin || ln -sf ".$(bindir)" bin
rm -f doc; ln -sf "$(CURRENT_BUILD)/doc" doc
rm -f examples; ln -sf "$(CURRENT_BUILD)/examples" examples
# The descent into "src" with target "check" is to build check
# prerequisites (e.g. CHECK_PROGRAMS, CHECK_LTLIBRARIES, ...).
check test units:
(cd $(CURRENT_BUILD)/src && $(MAKE) check)
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
systemtests regress: all
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
units%:
(cd $(CURRENT_BUILD)/src && $(MAKE) check)
+(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@))
regress%: all
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
dist:
(cd $(CURRENT_BUILD) && $(MAKE) $@)
$(install_sh) \
$(CURRENT_BUILD)/$(distdir).tar.gz \
"`pwd`"
TAGS tags:
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
ln -sf $(CURRENT_BUILD)/TAGS .
.PHONY: TAGS tags
.PHONY: doc-builds doc-prereq
doc-builds: doc-prereq
+(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="`builddir="$(builddir)" srcdir="$(srcdir)" "$(srcdir)/doc/find_public_interface.sh"`")
doc-internals-builds: doc-prereq
+(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="$(srcdir)/src src")
doc-prereq:
+(cd $(CURRENT_BUILD) && for dir in `find . -name Makefile | xargs grep -l BUILT_SOURCES`; do (cd `dirname "$$dir"`; (cat Makefile; echo 'doc-prereq: $$(BUILT_SOURCES)') | $(MAKE) -f- doc-prereq); done)
# Any other target than the default doesn't do the extra stuff above.
# Split out "examples" target, recent Makes don't want them combined.
examples:
+(cd $(CURRENT_BUILD) && $(MAKE) $@)
%:
+(cd $(CURRENT_BUILD) && $(MAKE) $@)