aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-08-24 12:53:07 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-08-24 12:53:07 +0300
commit99441908700b1862fb3895bd7178f434b2fd9aa0 (patch)
tree19730700bff9b2088d019cd368837800f5e01a60
parent2725fd1352edff4b49af21f9a4109e86491506b0 (diff)
Add version.hxx back into distribution and don't clean it up from src
-rw-r--r--README-GIT4
-rw-r--r--libbpkg/.gitignore1
-rw-r--r--libbpkg/buildfile6
-rw-r--r--libbpkg/version.hxx0
4 files changed, 10 insertions, 1 deletions
diff --git a/README-GIT b/README-GIT
new file mode 100644
index 0000000..7975aa4
--- /dev/null
+++ b/README-GIT
@@ -0,0 +1,4 @@
+The checked out libbpkg/version.hxx will be overwritten during the build
+process but these changes should be ignored. To do this automatically, run:
+
+git update-index --assume-unchanged libbpkg/version.hxx
diff --git a/libbpkg/.gitignore b/libbpkg/.gitignore
deleted file mode 100644
index 426db9e..0000000
--- a/libbpkg/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-version.hxx
diff --git a/libbpkg/buildfile b/libbpkg/buildfile
index c55fd20..7560620 100644
--- a/libbpkg/buildfile
+++ b/libbpkg/buildfile
@@ -6,7 +6,13 @@ import int_libs = libbutl%lib{butl}
lib{bpkg}: {hxx ixx txx cxx}{** -version} {hxx}{version} $int_libs
+# Include the generated version header into the distribution (so that we don't
+# pick up an installed one) and don't remove it when cleaning in src (so that
+# clean results in a state identical to distributed).
+#
hxx{version}: in{version} $src_root/file{manifest}
+hxx{version}: dist = true
+hxx{version}: clean = ($src_root != $out_root)
# For pre-releases use the complete version to make sure they cannot be used
# in place of another pre-release or the final version.
diff --git a/libbpkg/version.hxx b/libbpkg/version.hxx
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libbpkg/version.hxx