make: Wildcards
1
1 4.4 Using Wildcard Characters in File Names
1 ===========================================
1
1 A single file name can specify many files using "wildcard characters".
1 The wildcard characters in 'make' are '*', '?' and '[...]', the same as
1 in the Bourne shell. For example, '*.c' specifies a list of all the
1 files (in the working directory) whose names end in '.c'.
1
1 The character '~' at the beginning of a file name also has special
1 significance. If alone, or followed by a slash, it represents your home
1 directory. For example '~/bin' expands to '/home/you/bin'. If the '~'
1 is followed by a word, the string represents the home directory of the
1 user named by that word. For example '~john/bin' expands to
1 '/home/john/bin'. On systems which don't have a home directory for each
1 user (such as MS-DOS or MS-Windows), this functionality can be simulated
1 by setting the environment variable HOME.
1
1 Wildcard expansion is performed by 'make' automatically in targets
1 and in prerequisites. In recipes, the shell is responsible for wildcard
1 expansion. In other contexts, wildcard expansion happens only if you
1 request it explicitly with the 'wildcard' function.
1
1 The special significance of a wildcard character can be turned off by
1 preceding it with a backslash. Thus, 'foo\*bar' would refer to a
1 specific file whose name consists of 'foo', an asterisk, and 'bar'.
1
Menu