]> Lady鈥檚 Gitweb - Shushe/commitdiff
Disallow filenames which end in a cloparen
authorLady <redacted>
Fri, 2 Feb 2024 04:06:22 +0000 (23:06 -0500)
committerLady <redacted>
Sat, 3 Feb 2024 22:24:22 +0000 (17:24 -0500)
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 馃啑.

GNUmakefile
README.markdown

index 1e809b241c73de867d3aaa268a22f5f0ebe641cd..1bdc8b76fde13491b92c3c5399b9d27e313a2337 100644 (file)
@@ -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.
index 81279a4dba7b8338a64074f4470a5d6fe8cd58e6..e2838fad0204817504137d83002e34ca4f0b528e 100644 (file)
@@ -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
 
This page took 0.026807 seconds and 4 git commands to generate.