summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-08-21 01:57:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-08-21 01:57:31 +0300
commitaae9a0512300970cb3a7023e992bae6f003e249c (patch)
tree4f8fc7c81180ce79a1a89856bda1096531d19569
parentbbacd1838d5f3705e773365af3b7b66d99388df1 (diff)
Don't clean version
-rw-r--r--hello/buildfile10
-rw-r--r--mhello/buildfile9
2 files changed, 14 insertions, 5 deletions
diff --git a/hello/buildfile b/hello/buildfile
index 95ac13d..2c36e08 100644
--- a/hello/buildfile
+++ b/hello/buildfile
@@ -2,10 +2,14 @@ import libs = libhello%lib{hello}
./: exe{hello} doc{version} file{manifest}
-doc{version}: file{manifest} # Generated by the version module.
-doc{version}: dist = true
+# The version file is auto-generated (by the version module) from manifest.
+# Include it in distribution and don't remove when cleaning in src (so that
+# clean results in a state identical to distributed).
+#
+doc{version}: file{manifest}
+doc{version}: dist = true
+doc{version}: clean = ($src_root != $out_root)
exe{hello}: cxx{hello} $libs
exe{hello}: test.arguments = World "Planet #345732"
exe{hello}: test.output = test.out
-
diff --git a/mhello/buildfile b/mhello/buildfile
index f13dea8..062fef1 100644
--- a/mhello/buildfile
+++ b/mhello/buildfile
@@ -3,8 +3,13 @@ import libs += libstd-modules%liba{std-modules}
./: exe{hello} doc{version} file{manifest}
-doc{version}: file{manifest} # Generated by the version module.
-doc{version}: dist = true
+# The version file is auto-generated (by the version module) from manifest.
+# Include it in distribution and don't remove when cleaning in src (so that
+# clean results in a state identical to distributed).
+#
+doc{version}: file{manifest}
+doc{version}: dist = true
+doc{version}: clean = ($src_root != $out_root)
exe{hello}: cxx{hello} $libs
exe{hello}: test.arguments = World "Planet #345732"