message: Improved messaging in make style
diff: @@ -671,24 +671,35 @@ DEPRECATION_WARNING := \
  "This feature is planned for removal in the next release."\
  "Please open an issue at github.com/mfem/mfem/issues if you depend on it."
  deprecation-warnings:
  - @if [ -t 1 ]; then\
  - red="\033[0;31m";\
  - yellow="\033[0;33m";\
  - end="\033[0m";\
  - fi;\
  + @if [ -t 1 ]; then red="\033[0;31m"; yellow="\033[0;33m"; end="\033[0m"; fi;\
  if [ $(MFEM_USE_LEGACY_OPENMP) = YES ]; then\
  printf $$red"[MFEM_USE_LEGACY_OPENMP]"$$end": "$$yellow"%s"$$end"\n"\
  $(DEPRECATION_WARNING);\
  fi
  -style:
  - @if ! $(ASTYLE) $(FORMAT_FILES) | grep Formatted; then\
  - echo "No source files were changed.";\
  +# $(call mfem-check, command-to-execute, success_msg, failed_msg)
  +mfem-check-command = \
  + @if [ -t 1 ]; then red="\033[0;31m"; green="\033[0;32m"; end="\033[0m"; fi;\
  + if ! $(1); then\
  + printf $$green"[OK] "; printf $(2); printf $$end"\n";\
  + else\
  + printf $$red"[FAILED] "; printf $(3); printf $$end"\n";\
  fi
  - @echo "Checking usage of cout and cerr."
  - @-(grep cout */*.?pp | grep -v examples/ | grep -v general/globals | grep -v cerrno)|| true
  - @-(grep cerr */*.?pp | grep -v examples/ | grep -v general/globals | grep -v cerrno)|| true
  - @echo "This list should be empty!!"
  +
  +style:
  + @echo "Applying C++ code style..."
  + $(call mfem-check-command,\
  + $(ASTYLE) $(FORMAT_FILES) | grep Formatted,\
  + "No source files were changed",\
  + "Make sure the code is formatted with Artistic Style 2.05.1")
  + @echo "Checking for use of std::cout..."
  + $(call mfem-check-command,\
  + grep cout */*.?pp | grep -v examples/ | grep -v general/globals | grep -v cerrno,\
  + "No use of std::cout found", "Use mfem::out instead of std::cout")
  + @echo "Checking for use of std::cerr..."
  + $(call mfem-check-command,\
  + grep cerr */*.?pp | grep -v examples/ | grep -v general/globals | grep -v cerrno,\
  + "No use of std::cerr found", "Use mfem::err instead of std::cerr")
  # Print the contents of a makefile variable, e.g.: 'make print-MFEM_LIBS'.
  print-%:
  