Makefile: More robust check-scripts

Use **xargs** to pass results of **find** instead of word splitting. Word splitting fails when filenames contain white spaces (or if no files are found).
This commit is contained in:
Unrud
2022-06-14 15:52:49 +02:00
committed by abcdefg30
parent 8e1dce4bbe
commit bd6d69c5a1

View File

@@ -118,9 +118,7 @@ endif
check-scripts:
@echo
@echo "Checking for Lua syntax errors..."
@luac -p $(shell find mods/*/maps/* -iname '*.lua')
@luac -p $(shell find lua/* -iname '*.lua')
@luac -p $(shell find mods/*/scripts/* -iname '*.lua')
@find lua/ mods/*/{maps,scripts}/ -iname "*.lua" -print0 | xargs -0n1 luac -p
test: all
@echo