distclean 979 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 -i distclean
  13. if [ $? -ne 0 ]; then
  14. echo "Uh-oh! Make distclean failed."
  15. exit 1
  16. fi
  17. fi
  18. echo "$0: Removing auto* files..."
  19. rm -rf autom4te.cache
  20. find . -type f -name Makefile.in -print| xargs rm -f
  21. rm -f aclocal.m4 compile config.guess config.h.in config.sub configure depcomp
  22. rm -f m4/Makefile.am
  23. echo "$0: Removing miscelanious files..."
  24. rm -f po/*.gmo po/stamp-po
  25. rm -f lib/tests/*.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..."