diff --git a/make/linux/makefiles/vm.make b/make/linux/makefiles/vm.make index 6ab3f738c2e3c3047490f6b60251b81feb467d73..653da7de6a7d1d466d6b346c9745a0cc8f2a1e31 100644 --- a/make/linux/makefiles/vm.make +++ b/make/linux/makefiles/vm.make @@ -168,7 +168,9 @@ endif # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. define findsrc - $(notdir $(shell find $(1) \( -name \*.c -o -name \*.cpp -o -name \*.s \) -a \! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \) )) + $(notdir $(shell find $(1)/. ! -name . -prune \ + -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ + -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) endef Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) diff --git a/make/solaris/makefiles/vm.make b/make/solaris/makefiles/vm.make index 6e5e59b741685b51d53b07a025db0333f7c86d7a..93d8396faa9f0d26ca2f0d75e708c77003073c8a 100644 --- a/make/solaris/makefiles/vm.make +++ b/make/solaris/makefiles/vm.make @@ -184,7 +184,9 @@ endif # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. define findsrc - $(notdir $(shell find $(1) \( -name \*.c -o -name \*.cpp -o -name \*.s \) -a \! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \) )) + $(notdir $(shell find $(1)/. ! -name . -prune \ + -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ + -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) endef Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) diff --git a/make/windows/create_obj_files.sh b/make/windows/create_obj_files.sh index 61729a8ab7c214f2bc13f1553a1e555454956959..52ae0bb785c1bc09b2ffa88cfb7a1b59e75e012c 100644 --- a/make/windows/create_obj_files.sh +++ b/make/windows/create_obj_files.sh @@ -107,8 +107,12 @@ case "${Platform_arch_model}" in "x86_64") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_32*" ;; esac +# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. function findsrc { - $FIND ${1} \( -name \*.c -o -name \*.cpp -o -name \*.s \) -a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) | sed 's/.*\/\(.*\)/\1/'; + $FIND ${1}/. ! -name . -prune \ + -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ + -a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) \ + | sed 's/.*\/\(.*\)/\1/'; } Src_Files=