From 9f93d058c363ef61802222d8a63a75b0643c8bf0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 17 Mar 2017 15:20:41 +0200 Subject: Add support for inclusion/exclusion groups in wildcard patterns For example cxx{* -{foo bar *x}}. --- doc/manual.cli | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/manual.cli b/doc/manual.cli index 232b0fa..0afb97f 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -95,6 +95,23 @@ exe{hello}: cxx{f* +*oo} # Ok, no duplicates. ./: {*/ -build} # Error: exclusion must match a directory. \ +If many inclusions or exclusions need to be specified, then an +inclusion/exclusion group can be used. For example: + +\ +exe{hello}: cxx{f* -{foo bar}} # Exclude foo and bar if present. +\ + +This is particularly useful if you would like to list the names to exclude +in a variable. For example, this is how we can exclude certain files from +compilation but still include them as ordinary file prerequisites (so that +they are still included into the distribution): + +\ +exc = foo.cxx bar.cxx +exe{hello}: cxx{f* -{$exc}} file{$exc} +\ + One common situation that calls for exclusions is auto-generated source code. Let's say we have auto-generated command line parser in \c{options.hxx} and \c{options.cxx}. Because of the in-tree builds, our name pattern may or -- cgit v1.1