4261cec435a67f5a86a9dd5268aef9bdab66e84d
max
  Fri Apr 25 15:42:59 2025 -0700
falling back to find in makefile if gitFiles is not present, which is the case for all mirrors

diff --git src/hg/htdocs/makefile src/hg/htdocs/makefile
index 74a1a1eb1ff..f0dbf3e1d17 100644
--- src/hg/htdocs/makefile
+++ src/hg/htdocs/makefile
@@ -1,27 +1,32 @@
 kentSrc = ../..
 include ../../inc/common.mk
 
 GIT = git
 GITUP = ${GIT} pull
 
 ifeq (${FIND},)
     INSIDEGIT := $(shell git rev-parse --is-inside-work-tree 2>/dev/null)
+    HASGITFILES := $(shell which gitFiles && echo true)
+
+    # Default to using find: Mirrors do not have the program 'gitFiles'. Also gitFiles is not needed anyways.
+    # Also, when gitFiles is not present, the make target would silently fail and do nothing.
+    FIND = find
     ifeq (${INSIDEGIT},true)
+        ifeq (${HASGITFILES},true)
     	    FIND = gitFiles
-    else
-	FIND = find
+        endif
     endif
 endif
 
 # if you need to pick up files not checked-in yet for rsync,
 # you can run it like this:
 #
 #   make FIND=find
 #
 # but be careful as it will rsync everything over including junk
 
 # REMEMBER: HTDOCSEXTRA 
 # htdocsExtra is a repository that contains large files that we
 # do not wish to burden the main kent repo with.
 # You can check it out and make there too.
 # If you think there is a file missing, see if it is under the htdocsExtra repo.