#
# 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.
+# 2. set up builds/$(CURRENT_BUILD)/{bin,lib} symlinks
+# 3. set up builds/bin and builds/lib symlinks
# Include the "current" build profile.
include current
# 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_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
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)"
+# set up builds/$(CURRENT_BUILD)/{bin,lib}
+ $(AM_V_mkdir) $(CURRENT_BUILD)/bin
+ $(AM_V_mkdir) $(CURRENT_BUILD)/lib
+# symlink libcvc4, libcvc4parser
+ $(AM_V_at)cd $(CURRENT_BUILD)/lib && \
+ ln -sf ../src/libcvc4.* \
+ ../src/parser/libcvc4parser.* \
+ .
+ -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
+ test -d ../src/.libs && \
+ ln -sf ../src/.libs/libcvc4.* \
+ .
+ -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
+ test -d ../src/parser/.libs && \
+ ln -sf ../src/parser/.libs/libcvc4parser.* \
+ .
ifeq ($(CVC4_BUILD_LIBCOMPAT),yes)
-# install libcvc4compat
- $(CURRENT_BUILD)/libtool --mode=install $(install_sh) \
- $(CURRENT_BUILD)/src/compat/libcvc4compat.la \
- "$(abs_builddir)$(libdir)"
+# symlink libcvc4compat
+ $(AM_V_at)cd $(CURRENT_BUILD)/lib && \
+ ln -sf ../src/compat/libcvc4compat.* \
+ .
+ -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \
+ test -d ../src/compat/.libs && \
+ ln -sf ../src/compat/.libs/libcvc4compat.* \
+ .
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)"; \
+# symlink the binaries
+ $(AM_V_at)cd $(CURRENT_BUILD)/bin && \
+ for binary in $(CVC4_BINARIES); do \
+ if test -x ../src/main/$$binary; then \
+ ln -sf ../src/main/$$binary \
+ . ; \
else \
- rm -f "$(abs_builddir)$(bindir)/$$file"; \
+ rm -f "$$binary"; \
fi; \
done
-endif
-# set up builds/$(CURRENT_BUILD)/bin and builds/$(CURRENT_BUILD)/lib
- rm -f $(CURRENT_BUILD)/lib; ln -sf "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/lib
- rm -f $(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
- rm -f lib; ln -sf ".$(libdir)" lib
- rm -f bin; ln -sf ".$(bindir)" bin
- rm -f doc; ln -sf "$(CURRENT_BUILD)/doc" doc
- rm -f examples; ln -sf "$(CURRENT_BUILD)/examples" examples
+# set up builds/doc and builds/examples
+ $(AM_V_at)rm -f bin; ln -sf $(CURRENT_BUILD)/bin bin
+ $(AM_V_at)rm -f lib; ln -sf $(CURRENT_BUILD)/lib lib
+ $(AM_V_at)rm -f doc; ln -sf $(CURRENT_BUILD)/doc doc
+ $(AM_V_at)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:
+check test units: all
(cd $(CURRENT_BUILD)/src && $(MAKE) check)
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
systemtests regress: all
+(cd $(CURRENT_BUILD)/test && $(MAKE) $@)
-units%:
+units%: all
(cd $(CURRENT_BUILD)/src && $(MAKE) check)
+(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@))
regress%: all