]> Lady’s Gitweb - Shushe/commitdiff
Support -exec in find 0.9.5
authorLady <redacted>
Sat, 6 Jul 2024 22:50:57 +0000 (18:50 -0400)
committerLady <redacted>
Sat, 6 Jul 2024 22:53:38 +0000 (18:53 -0400)
`-print` is only implicitly added to `find` rules which do not contain
an `-exec`. The desired behaviour is that `-print` is called
regardless, with the assumption that `-exec` commands are always
silent.

GNUmakefile
README.markdown

index 6fd197044b04a120cead268a8f8ab99a86566839..931f32dde15f2e32e348ef24648d551567e8023f 100644 (file)
@@ -344,10 +344,10 @@ override perenc = $(shell $(PRINTF) '%s\n' $(foreach unencoded,$1,$(call quote,$
 override pathenc = $(subst %2F,/,$(call perenc,$1))
 
 # (overridable) Collect all of the applicable includes from the includes directory.
-sourceincludes := $(if $(and $(INCLUDEDIR),$(wildcard $(INCLUDEDIR))),$(patsubst ./%,%,$(shell $(FIND) $(foreach dir,$(INCLUDEDIR),$(call quote,$(dir))) '(' $(FINDINCLUDERULES) ')' -a -type f)),)
+sourceincludes := $(if $(and $(INCLUDEDIR),$(wildcard $(INCLUDEDIR))),$(patsubst ./%,%,$(shell $(FIND) $(foreach dir,$(INCLUDEDIR),$(call quote,$(dir))) '(' $(FINDINCLUDERULES) ')' -a -type f -a -print)),)
 
 # (overridable) Collect all of the applicable source files from the source directory, removing any which are also includes.
-sourcefiles := $(if $(and $(SRCDIR),$(wildcard $(SRCDIR))),$(filter-out $(sourceincludes),$(patsubst ./%,%,$(shell $(FIND) $(foreach dir,$(SRCDIR),$(call quote,$(dir))) '(' $(FINDRULES) ')' -a -type f))))
+sourcefiles := $(if $(and $(SRCDIR),$(wildcard $(SRCDIR))),$(filter-out $(sourceincludes),$(patsubst ./%,%,$(shell $(FIND) $(foreach dir,$(SRCDIR),$(call quote,$(dir))) '(' $(FINDRULES) ')' -a -type f -a -print))))
 
 # Figure out the file type of each source file and source include.
 ifneq ($(wildcard $(BUILDDIR)/magic.mgc),)
index 6b865aeb07499008c86d550e253ae89cdcc51820..040d56465513be1b09df1536dd481cbe15020f09 100644 (file)
@@ -283,6 +283,8 @@ The following additional variables can be used to control the behaviour
     those which end with a cloparen, and those which contain a hash,
     buck, percent, asterisk, colon, semi, eroteme, bracket, backslash,
     or pipe.
+  It is important that these rules not produce any output, as anything
+    printed to `stdout` will be considered a result of the find.
 
 - **`EXTRAFINDRULES`:**
   The value of this variable is appended to `FINDRULES` by default, to
This page took 0.028205 seconds and 4 git commands to generate.