wmkdep: Simplified file scanning for dependencies avoiding too many open files

This change ensures only one include file is open at a time by storing the
included files on a dynamic list rather than scanning the tree and holding a
list of open buffers.  This new approach is a bit faster and avoids the "too
many open files" error on machines with low limits on the number of file
descriptors allocated to users.
This commit is contained in:
Henry Weller
2018-05-01 11:12:38 +01:00
parent 35c3c814ce
commit 9ffc025b08
3 changed files with 853 additions and 353 deletions

View File

@ -29,8 +29,9 @@ $(OBJECTS_DIR)/%.dep : %
$(call VERBOSE_MESSAGE,Making dependency list for source file,$(<F))
@$(WM_SCRIPTS)/makeTargetDir $@
@$(WMAKE_BIN)/wmkdep \
-R '$(OBJECTS_DIR)/' '$$(OBJECTS_DIR)/' \
-R '$(WM_PROJECT_DIR)/' '$$(WM_PROJECT_DIR)/' \
-R '$(WM_THIRD_PARTY_DIR)/' '$$(WM_THIRD_PARTY_DIR)/' \
-I$(*D) $(LIB_HEADER_DIRS) $< > $@
-I$(*D) $(LIB_HEADER_DIRS) $< $@
#------------------------------------------------------------------------------