aboutsummaryrefslogtreecommitdiff
path: root/build2/version/rule
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-28 08:33:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-28 08:33:42 +0200
commit593fd960891027b97567b2622ed4b6c16070ab36 (patch)
treef4cb383f8606fde6adff7ac9f90a20cc9ad59840 /build2/version/rule
parentac402e1fef2c13b5860ca5223d764bbfdfb867e3 (diff)
Implement support for pre-processing version headers (or other files)
Also implement the build system version check.
Diffstat (limited to 'build2/version/rule')
-rw-r--r--build2/version/rule17
1 files changed, 17 insertions, 0 deletions
diff --git a/build2/version/rule b/build2/version/rule
index 75a8c12..186df59 100644
--- a/build2/version/rule
+++ b/build2/version/rule
@@ -30,6 +30,23 @@ namespace build2
static target_state
perform_update (action, const target&);
};
+
+ // Preprocess an .in file.
+ //
+ class version_in: public rule
+ {
+ public:
+ version_in () {}
+
+ virtual match_result
+ match (action, target&, const string&) const override;
+
+ virtual recipe
+ apply (action, target&) const override;
+
+ static target_state
+ perform_update (action, const target&);
+ };
}
}