To the build system:
authorMorgan Deters <mdeters@gmail.com>
Wed, 29 Aug 2012 11:50:15 +0000 (11:50 +0000)
committerMorgan Deters <mdeters@gmail.com>
Wed, 29 Aug 2012 11:50:15 +0000 (11:50 +0000)
* Fix "make distclean."  This should fix the "local regressions fail"
  that caused documentation, debian, and "distcheck" nightly build targets
  to fail.

* "make clean" now removes some options stuff that previously required a
  "make distclean."

* Cosmetic and portability adjustments.

src/options/Makefile.am
test/unit/Makefile.am

index eb1a2c498fc0a2615030ebae001cccb165e60ba7..f89fca922cf45dbe48b0857bd9a56c90f7fb9aec 100644 (file)
@@ -101,7 +101,7 @@ BUILT_SOURCES = \
        options.cpp \
        options_holder.h
 
-DISTCLEANFILES = \
+CLEANFILES = \
        $(OPTIONS_FILES_SRCS) \
        $(BUILT_SOURCES) \
        options-stamp
@@ -178,11 +178,17 @@ options-stamp: options_holder_template.h options_template.cpp ../smt/smt_options
                @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)" "$(dir $(builddir)/$(o))") \
+               $(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
index 716b8959eb482568d60977fd746813ada1729867..a287b752076fe874d6498baa1a6f767caa65896a 100644 (file)
@@ -105,7 +105,7 @@ EXTRA_DIST = \
        $(TEST_DEPS_DIST)
 
 MOSTLYCLEANFILES = $(UNIT_TESTS) $(UNIT_TESTS:%=%.cpp) $(UNIT_TESTS:%=%.lo)
-DISTCLEANFILES = $(UNIT_TESTS:%=.deps/%.Plo)
+DISTCLEANFILES = $(UNIT_TESTS:%=@DEPDIR@/%.Plo)
 
 # the tests automake infrastructure doesn't clean up .o files :-(
 # handle both .libs and _libs variants