distclean 1014 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # This script cleans up all auto*-generated files. If Makefiles are present
  3. # it will run 'make distclean' first.
  4. #
  5. # Please run this script from the top-level directory.
  6. if [ ! -f tools/distclean ]; then
  7. echo "Please run this script from the top-level directory of Nagios-plugins."
  8. exit 1
  9. fi
  10. if [ -f Makefile ]; then
  11. echo "$0: Makefile present. Cleaning up with 'make distclean'..."
  12. make distclean
  13. if [ $? -ne 0 ]; then
  14. echo "Uh-oh! Make distclean failed."
  15. echo "Please run './config.status' and try again."
  16. exit 1
  17. fi
  18. fi
  19. echo "$0: Removing auto* files..."
  20. rm -rf autom4te.cache
  21. find . -type f -name Makefile.in -print0| xargs -0 rm -f
  22. rm -f aclocal.m4 compile config.guess config.h.in config.sub configure depcomp
  23. rm -f m4/Makefile.am
  24. echo "$0: Removing miscelanious files..."
  25. rm -f po/*.gmo po/stamp-po
  26. rm -f doc/developer-guidelines.html
  27. rm -f INSTALL install-sh missing
  28. rm -f plugins/t/check_nagios.nagios?.status.???.tmp
  29. echo "$0: Cleanup complete! Have a nice day..."