From 1dfb57de029dbef0b5d05561891f841b5ba87291 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Thu, 17 Dec 2009 19:12:43 +0000 Subject: [PATCH] coding standard fix on SmtEngine; fix recursive make --- Makefile | 17 ++++++++++++++--- Makefile.am | 1 - Makefile.builds.in | 4 +--- Makefile.reconf_args | 1 + Makefile.subdir | 3 ++- src/smt/smt_engine.cpp | 3 ++- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index aa8ebf232..43fd2e3b1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,15 @@ -topdir = . -srcdir = . +builddir = builds -include Makefile.subdir +.PHONY: _default_build_ all +_default_build_: all +all %: + @if test -e $(builddir); then \ + echo cd $(builddir); \ + cd $(builddir); \ + echo $(MAKE) $@; \ + $(MAKE) $@; \ + else \ + echo; \ + echo 'Run configure first, or type "make" in a configured build directory.'; \ + echo; \ + fi diff --git a/Makefile.am b/Makefile.am index 07a91f21a..20d6298f4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,4 +16,3 @@ production debug default competition: else \ ./configure --with-build=$@ $(CONFARGS) && $(MAKE); \ fi - diff --git a/Makefile.builds.in b/Makefile.builds.in index 0955518bf..00551ea6f 100644 --- a/Makefile.builds.in +++ b/Makefile.builds.in @@ -12,11 +12,10 @@ bindir = @bindir@ libdir = @libdir@ abs_builddir = @abs_builddir@ -.PHONY: _default_build_ +.PHONY: _default_build_ all _default_build_: all all: (cd $(CURRENT_BUILD) && $(MAKE) $@) - # populate builds/$(CURRENT_BUILD)/bin and builds/$(CURRENT_BUILD)/lib $(mkinstalldirs) "$(CURRENT_BUILD)$(bindir)" "$(CURRENT_BUILD)$(libdir)" $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/libcvc4.la "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/parser/libcvc4parser.la "$(abs_builddir)$(libdir)" @@ -25,7 +24,6 @@ all: eval "(cd $(CURRENT_BUILD)/src/main && $$relink_command)" test -e $(CURRENT_BUILD)/lib || ln -sfv "$(abs_builddir)$(libdir)" $(CURRENT_BUILD)/lib test -e $(CURRENT_BUILD)/bin || ln -sfv "$(abs_builddir)$(bindir)" $(CURRENT_BUILD)/bin - # populate builds/bin and builds/lib mkdir -pv ".$(bindir)" ".$(libdir)" $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/libcvc4.la "`pwd`$(libdir)" $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/parser/libcvc4parser.la "`pwd`$(libdir)" diff --git a/Makefile.reconf_args b/Makefile.reconf_args index 10d3c84b9..516ae0adb 100644 --- a/Makefile.reconf_args +++ b/Makefile.reconf_args @@ -1,3 +1,4 @@ +# -*-makefile-*- # This makefile snippet maps make-time arguments to configure and # build-type arguments # diff --git a/Makefile.subdir b/Makefile.subdir index da450345b..590b3ea4e 100644 --- a/Makefile.subdir +++ b/Makefile.subdir @@ -1,7 +1,8 @@ +# -*-makefile-*- include $(topdir)/builds/current builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir) -.PHONY: _default_build_ +.PHONY: _default_build_ all _default_build_: all %: @if test -e $(builddir); then \ diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index f07ad577e..23dc1153a 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -40,8 +40,9 @@ Node SmtEngine::processAssertionList() { Node asserts; for(std::vector::iterator i = d_assertions.begin(); i != d_assertions.end(); - ++i) + ++i) { asserts = asserts.isNull() ? *i : d_em->mkNode(AND, asserts, *i); + } return asserts; } -- 2.30.2