From: Lady Date: Fri, 2 Feb 2024 04:06:22 +0000 (-0500) Subject: Disallow filenames which end in a cloparen X-Git-Tag: 0.5.0~5 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/39cc0a59514f4acd5c7ca4837fcb5480388ace1c?ds=sidebyside Disallow filenames which end in a cloparen There is a bug in G路N路U Make which causes the `wildcard` function to ignore files and directories which end in a cloparen (`)`). To be safe, disallow these files as sources, even though parens are generally 馃啑. --- diff --git a/GNUmakefile b/GNUmakefile index 1e809b2..1bdc8b7 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -141,7 +141,7 @@ THISDIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) # 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. diff --git a/README.markdown b/README.markdown index 81279a4..e2838fa 100644 --- a/README.markdown +++ b/README.markdown @@ -175,9 +175,10 @@ The following additional variables can be used to control the behaviour - **`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 @@ -244,9 +245,12 @@ Source files whose media type does not have an associated X路S路L路T 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