New C++ API: Fix isDefinedKind() to not be ambigious with respect to … (#2384)
[cvc5.git] / Makefile.builds.in
1 # -*- makefile -*-
2 #
3 # This Makefile produces the Makefile in the top-level builds/
4 # directory for standard-path builds (e.g., those configured from the
5 # source tree). It has some autoconf cruft in it, documented below.
6 #
7 # Its main purposes are to:
8 # 1. build the current build profile
9 # 2. set up builds/$(CURRENT_BUILD)/{bin,lib} symlinks
10 # 3. set up builds/bin and builds/lib symlinks
11
12 # Include the "current" build profile.
13 include current
14
15 # Set up $(MAKE)
16 @SET_MAKE@
17
18 # Set up some basic autoconf make vars
19 srcdir = @srcdir@
20 builddir = @builddir@
21 install_sh = @install_sh@
22 mkinstalldirs = $(install_sh) -d
23 exec_prefix = @exec_prefix@
24 prefix = @prefix@
25 bindir = @bindir@
26 libdir = @libdir@
27 abs_builddir = @abs_builddir@
28 distdir = @PACKAGE@-@VERSION@
29 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
30 EXEEXT = @EXEEXT@
31 SHELL = @SHELL@
32 LIBTOOL = $(CURRENT_BUILD)/libtool
33
34 # Are we building the libcvc4compat library ?
35 CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@
36
37 # @
38 AM_V_at = $(am__v_at_$(V))
39 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
40 am__v_at_0 = @
41 am__v_at_1 =
42 # mkinstalldirs (never prefix with @; not a top-level instruction)
43 AM_V_mkdir_noat = $(am__v_mkdir_noat_$(V))
44 am__v_mkdir_noat_ = $(am__v_mkdir_noat_$(AM_DEFAULT_VERBOSITY))
45 am__v_mkdir_noat_0 = $(SHELL) -c 'echo " MKDIR $$@"; $(mkinstalldirs) "$$@"' bash
46 am__v_mkdir_noat_1 = $(mkinstalldirs)
47 # mkinstalldirs (can prefix with @)
48 AM_V_mkdir = $(am__v_mkdir_$(V))
49 am__v_mkdir_ = $(am__v_mkdir_$(AM_DEFAULT_VERBOSITY))
50 am__v_mkdir_0 = @$(am__v_mkdir_noat_0)
51 am__v_mkdir_1 = $(am__v_mkdir_noat_1)
52
53 # all the binaries that might need to be installed
54 # (it's not a fatal error for one/some don't exist in a given build
55 # configuration)
56 CVC4_BINARIES = cvc4$(EXEEXT) pcvc4$(EXEEXT)
57
58 .PHONY: _default_build_ all examples
59 _default_build_: all
60 all:
61 # build the current build profile
62 $(AM_V_at)(cd $(CURRENT_BUILD) && $(MAKE) $@)
63 # set up builds/$(CURRENT_BUILD)/{bin,lib}
64 $(AM_V_mkdir) $(CURRENT_BUILD)/bin
65 $(AM_V_mkdir) $(CURRENT_BUILD)/lib
66 # symlink libcvc4, libcvc4parser
67 $(AM_V_at)cd $(CURRENT_BUILD)/lib && \
68 ln -sf ../src/libcvc4.* \
69 ../src/parser/libcvc4parser.* \
70 .
71 -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
72 test -d ../src/.libs && \
73 ln -sf ../src/.libs/libcvc4.* \
74 .
75 -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
76 test -d ../src/parser/.libs && \
77 ln -sf ../src/parser/.libs/libcvc4parser.* \
78 .
79 ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
80 # symlink libcvc4compat
81 $(AM_V_at)cd $(CURRENT_BUILD)/lib && \
82 ln -sf ../src/compat/libcvc4compat.* \
83 .
84 -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
85 test -d ../src/compat/.libs && \
86 ln -sf ../src/compat/.libs/libcvc4compat.* \
87 .
88 endif
89 # symlink the binaries
90 $(AM_V_at)cd $(CURRENT_BUILD)/bin && \
91 for binary in $(CVC4_BINARIES); do \
92 if test -x ../src/main/$$binary; then \
93 ln -sf ../src/main/$$binary \
94 . ; \
95 else \
96 rm -f "$$binary"; \
97 fi; \
98 done
99 # set up builds/doc and builds/examples
100 $(AM_V_at)rm -f bin; ln -sf $(CURRENT_BUILD)/bin bin
101 $(AM_V_at)rm -f lib; ln -sf $(CURRENT_BUILD)/lib lib
102 $(AM_V_at)rm -f doc; ln -sf $(CURRENT_BUILD)/doc doc
103 $(AM_V_at)rm -f examples; ln -sf $(CURRENT_BUILD)/examples examples
104
105 # The descent into "src" with target "check" is to build check
106 # prerequisites (e.g. CHECK_PROGRAMS, CHECK_LTLIBRARIES, ...).
107 check test units: all
108 (cd $(CURRENT_BUILD)/src && $(MAKE) check)
109 +(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
110 systemtests regress: all
111 +(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
112 units%: all
113 (cd $(CURRENT_BUILD)/src && $(MAKE) check)
114 +(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@))
115 regress%: all
116 +(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
117
118 dist:
119 (cd $(CURRENT_BUILD) && $(MAKE) $@)
120 $(install_sh) \
121 $(CURRENT_BUILD)/$(distdir).tar.gz \
122 "`pwd`"
123
124 TAGS tags:
125 +(cd $(CURRENT_BUILD) && $(MAKE) $@)
126 ln -sf $(CURRENT_BUILD)/TAGS .
127
128 .PHONY: TAGS tags
129
130 .PHONY: doc-builds doc-prereq
131 doc-builds: doc-prereq
132 +(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="`builddir="$(builddir)" srcdir="$(srcdir)" "$(srcdir)/doc/find_public_interface.sh"`")
133 doc-internals-builds: doc-prereq
134 +(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="$(srcdir)/src src")
135 doc-prereq:
136 +(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)
137
138 # Any other target than the default doesn't do the extra stuff above.
139 # Split out "examples" target, recent Makes don't want them combined.
140 examples:
141 +(cd $(CURRENT_BUILD) && $(MAKE) $@)
142 %:
143 +(cd $(CURRENT_BUILD) && $(MAKE) $@)