Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Written by and Copyright (C) 2001 the
  2. # Privoxy team. https://www.privoxy.org/
  3. #
  4. # Based on the Internet Junkbuster originally written
  5. # by and Copyright (C) 1997 Anonymous Coders and
  6. # Junkbusters Corporation. http://www.junkbusters.com
  7. #
  8. # This program is free software; you can redistribute it
  9. # and/or modify it under the terms of the GNU General
  10. # Public License as published by the Free Software
  11. # Foundation; either version 2 of the License, or (at
  12. # your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will
  15. # be useful, but WITHOUT ANY WARRANTY; without even the
  16. # implied warranty of MERCHANTABILITY or FITNESS FOR A
  17. # PARTICULAR PURPOSE. See the GNU General Public
  18. # License for more details.
  19. #
  20. # The GNU General Public License should be included with
  21. # this file. If not, you can view it at
  22. # http://www.gnu.org/copyleft/gpl.html
  23. # or write to the Free Software Foundation, Inc., 59
  24. # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  25. #
  26. #############################################################################
  27. GNU_MAKE_CMD = gmake
  28. MAKE_CMD = make
  29. error:
  30. @if [ -f GNUmakefile ]; then \
  31. echo "***"; \
  32. echo "*** You are not using the GNU version of Make - maybe it's called gmake"; \
  33. echo "*** or it's in a different PATH? Please read INSTALL." ; \
  34. echo "***"; \
  35. exit 1; \
  36. elif test -n "$(HOST_ARCH)" && test -z "$(MAKE_VERSION)" ; then \
  37. echo "***"; \
  38. echo "*** You are not using GNU Make on Solaris, please make sure you do" ; \
  39. echo "*** and re-run 'make' "; \
  40. echo "***"; \
  41. exit 1 ; \
  42. elif test -n "$(MACHINE_ARCH)" && test -z "$(MAKE_VERSION)" ; then \
  43. echo "***"; \
  44. echo "*** You are not using GNU Make on FreeBSD, please make sure you do" ; \
  45. echo "*** and re-run 'make' "; \
  46. echo "***"; \
  47. exit 1 ; \
  48. else \
  49. echo "***"; \
  50. echo "*** To build this program, you must run"; \
  51. echo "*** autoheader && autoconf && ./configure and then run GNU make."; \
  52. echo "***"; \
  53. echo -n "*** Shall I do this for you now? (y/n) "; \
  54. read answer; \
  55. if [ "$$answer" = "y" ]; then \
  56. autoheader && autoconf && ./configure || exit 1; \
  57. if $(GNU_MAKE_CMD) -v |grep GNU >/dev/null 2>/dev/null; then \
  58. $(GNU_MAKE_CMD) ;\
  59. elif $(MAKE_CMD) -v |grep GNU >/dev/null 2>/dev/null; then \
  60. $(MAKE_CMD) ;\
  61. else \
  62. echo "Neither 'make' nor 'gmake' are GNU compatible!" ; \
  63. echo "Please read INSTALL." ; \
  64. exit 1 ; \
  65. fi ;\
  66. fi; \
  67. fi
  68. .PHONY: error
  69. #############################################################################
  70. ## Local Variables:
  71. ## tab-width: 3
  72. ## end: