# By default, `find麓 will ignore files which begin with a period and those which are likely to cause problems for `make麓.
EXTRAFINDRULES :=
EXTRAFINDINCLUDERULES :=
-FINDRULES := ! '(' '(' -name '[.-]*' -o -name '*[][*?:|$$%\#\\; ]*' ')' -a -prune ')'$(if $(EXTRAFINDRULES), -a $(EXTRAFINDRULES),)
+FINDRULES := ! '(' '(' -name '[.-]*' -o -name '*[][*?:|$$%\#\\; ]*' -o -name '*[)]' ')' -a -prune ')'$(if $(EXTRAFINDRULES), -a $(EXTRAFINDRULES),)
FINDINCLUDERULES := $(FINDRULES)$(if $(EXTRAFINDINCLUDERULES), -a $(EXTRAFINDINCLUDERULES),)
# The list of magic files to use when determining media types.
- **`FINDRULES`:**
Rules to use with `find` when searching for source files.
- The default ignores files that start with a period or hyphen鈥恗inus
- and those which contain a hash, buck, percent, asterisk, colon,
- semi, eroteme, bracket, backslash, or pipe.
+ The default ignores files that start with a period or hyphen鈥恗inus,
+ those which end with a cloparen, and those which contain a hash,
+ buck, percent, asterisk, colon, semi, eroteme, bracket, backslash,
+ or pipe.
- **`EXTRAFINDRULES`:**
The value of this variable is appended to `FINDRULES` by default, to
contain Ascii white路space, colons (`:`), semis (`;`), pipes (`|`),
bucks (`$`), percents (`%`), hashes (`#`), asterisks (`*`), brackets
(`[` or `]`), erotemes (`?`), backslashes (`\`), or control
- characters, and must not begin with a hyphen鈥恗inus (`-`).**
+ characters, must not begin with a hyphen鈥恗inus (`-`), and must not
+ end with a cloparen (`)`).**
The former characters have the potential to conflict with make syntax,
- and a leading hyphen鈥恗inus is confusable for a command鈥恖ine argument.
+ a leading hyphen鈥恗inus is confusable for a command鈥恖ine argument, and
+ a trailing cloparen [activates a bug in G路N路U Make
+ 3.81](https://stackoverflow.com/questions/17148468/capturing-filenames-including-parentheses-with-gnu-makes-wildcard-function#comment24825307_17148894).
## Parsers