2
我想檢查是否所有具有特定名稱的文件都有一個字符串,如果不報告它們。我寫了這個序列並嘗試了多個其他的,但我不知道如何從列表中訪問文件的包含。如何檢查列表中的文件是否包含makefile中的內容?
SOURCES := $(shell find $(SOURCEDIR) -name 'mod.mak')#here I take the list of targeted files (this works fine)
$(foreach File, Files,
$(if $(grep -q "aaabbb" "$File"),,@echo "WARNING Missing sequence")
)