From 593fd960891027b97567b2622ed4b6c16070ab36 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Apr 2017 08:33:42 +0200 Subject: Implement support for pre-processing version headers (or other files) Also implement the build system version check. --- build2/version/rule | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'build2/version/rule') 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&); + }; } } -- cgit v1.1