makefile 842 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #
  2. # Compile at the maximum warning level to probe for warnings
  3. #
  4. MCS=../mcs/mcs.exe --wlevel 4
  5. all:
  6. failed=false; \
  7. for i in cs*.cs; do \
  8. case $$i in \
  9. cs[0-9]*-[0-9]*cs) \
  10. error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//' -e 's/-.*//'`; \
  11. ;;\
  12. cs[0-9-]*cs) \
  13. error=`echo $$i | sed -e 's/cs*//' -e 's/.cs//'`; \
  14. ;;\
  15. esac; \
  16. echo $(MCS) --probe $$error $$i; \
  17. $(MCS) --probe $$error 1 $$i > /dev/null; \
  18. code=$$?; \
  19. if test $$code != 123; then \
  20. echo Code is: $$code; \
  21. if [ x$$code = x124 ]; then \
  22. echo "Compiler failed to flag $$i"; \
  23. else \
  24. echo "Compiler failed to compile $$i"; \
  25. fi; \
  26. flist="$$flist $$i"; \
  27. failed=true; \
  28. else \
  29. echo test $$i ok; \
  30. fi; \
  31. done; \
  32. if $$failed; then \
  33. echo "The following tests failed: $$flist"; \
  34. else \
  35. echo All tests passed; \
  36. fi