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