The file always exist so no need to do '-include'. Replaced using: sed -i 's|-\(include $(RIOTCPU)/.*/Makefile.features\)|\1|' \ $(git grep -l '$(RIOTCPU)/.*/Makefile.features' boards)