From 9270982ee8ed2daf334dc4d3878ca0141b2a6371 Mon Sep 17 00:00:00 2001 From: paoletti <paoletti@umich.edu> Date: Tue, 12 Mar 2019 13:09:17 -0400 Subject: [PATCH] Fixed 'identifier' to skip subdirectories, remove old tarballs if they exist, and tell user which files are missing the identifier --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8750382..af89bf6 100644 --- a/Makefile +++ b/Makefile @@ -92,10 +92,11 @@ static: cppcheck --enable=all --suppress=missingIncludeSystem \ $(SOURCES) *.h *.hpp -# make identifier - will ensure that all source code and header files include -# the project identifier +# make identifier - will check to ensure that all source code and header files +# include the project identifier; skip subdirectories; +# also removes old submit tarballs, they are outdated identifier: - @if [ $$(grep --include=*.{h,hpp,c,cpp} -L $(IDENTIFIER) * | wc -l) -ne 0 ]; then echo "Missing project identifier"; exit 1; fi + @if [ $$(grep --include=*.{h,hpp,c,cpp} --directories=skip -L $(IDENTIFIER) * | wc -l) -ne 0 ]; then echo -n "Missing project identifier in file(s): ";echo `grep --include=*.{h,hpp,c,cpp} --directories=skip -L $(IDENTIFIER) *`;rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE); exit 1; fi # Build both release and debug executables all: clean -- GitLab