25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

check-build 1.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. ret=0
  3. #
  4. # Check that the Win32 config.h is in sync with config.h.in
  5. #
  6. config_h_in=$(dirname "$0")/../config.h.in
  7. win32_config_h=$(dirname "$0")/../win32/config.h
  8. failure=0
  9. for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
  10. do
  11. if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
  12. echo "error: $key missing from win32/config.h"
  13. failure=1
  14. fi
  15. done
  16. if test "$failure" != "0"; then
  17. ret=1
  18. else
  19. echo "0 errors in Win32 config.h"
  20. fi
  21. #
  22. # Check that we have no tabs or trailing spaces in the source code
  23. #
  24. failure=0
  25. for dir in caca src cxx examples ruby tools; do
  26. pushd ../$dir >/dev/null
  27. for x in $(make echo-sources); do
  28. if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
  29. echo "error: $dir/$x contains trailing spaces"
  30. failure=1
  31. fi
  32. if grep ' ' "$x" >/dev/null 2>&1; then
  33. echo "error: $dir/$x contains tabs"
  34. failure=1
  35. fi
  36. done
  37. popd >/dev/null
  38. done
  39. if test "$failure" != "0"; then
  40. ret=1
  41. else
  42. echo "0 errors in source code"
  43. fi
  44. if test "$ret" != "0"; then
  45. exit 1
  46. fi
  47. exit 0