diff --git a/Makefile b/Makefile index 08d92fe3..703616ad 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ top_builddir=. SUBDIRS = doc src SUBDIRS-$(CONFIG_NLS) += po CLEAN = features.log +calltest = $1-$1 all-recursive: config.h @@ -49,6 +50,16 @@ $(top_srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) @echo timestamp > $(top_srcdir)/stamp-h.in 2> /dev/null +# Makefile.lib heavily uses $(call ...), which was added in GNU Make 3.78. +# An elinks-users post on 2007-12-04 reported trouble with GNU Make 3.68. +# Detect this situation and give an error message. $(MAKECMDGOALS) is +# only defined by 3.76 and later, so specify the "all" target as well. +# This check has been tested with GNU Make 3.68, 3.77, 3.78.1, and 3.81. +ifneq ($(call calltest,ok),ok-ok) +$(MAKECMDGOALS) default all: + @echo >&2 "You need GNU Make 3.78 or later" + @false +else ifeq ($(wildcard Makefile.config),) # Catch all $(MAKECMDGOALS) default: @@ -56,3 +67,4 @@ $(MAKECMDGOALS) default: else include $(top_srcdir)/Makefile.lib endif +endif diff --git a/doc/installation.txt b/doc/installation.txt index 95c7da03..8c9d7073 100644 --- a/doc/installation.txt +++ b/doc/installation.txt @@ -19,9 +19,10 @@ required or recommended that you install. Requirements ~~~~~~~~~~~~ -To successfully install ELinks all that is required is GNU make and a C -compiler. If you want to install directly from GIT it is also required that -automake and autoconf is installed on your system. +To successfully install ELinks all that is required is GNU make +(version 3.78 or later) and a C compiler. If you want to install +directly from GIT it is also required that automake and autoconf +is installed on your system. Recommended Libraries and Programs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~