summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in29
1 files changed, 17 insertions, 12 deletions
diff --git a/Makefile.in b/Makefile.in
index 9b0fbbb..29905d1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,6 +6,18 @@ MAKEFLAGS += --no-print-directory --no-builtin-rules
all: Makefile build
###############################################################################
+# Configuration variables
+
+VERSION:= @@VERSION@@
+BINDIR := @@BINDIR@@
+LIBDIR := @@LIBDIR@@
+DOCDIR := @@DOCDIR@@
+MANDIR := @@MANDIR@@
+DATE := @@DATE@@
+LOCAL := @@LOCAL@@
+MAKE := $(shell which $(MAKE) 2>/dev/null || type -p $(MAKE) 2>/dev/null || echo "ct-ng:nomake")
+
+###############################################################################
# Sanity checks
# Check if Makefile is up to date:
@@ -13,6 +25,11 @@ Makefile: Makefile.in
@echo "$< did changed: you must re-run './configure'"
@false
+# Check we do have make
+ifeq ($(strip $(MAKE)),ct-ng:nomake)
+ $(error 'make' was not found on your system)
+endif
+
# If installing with DESTDIR, check it's an absolute path
ifneq ($(strip $(DESTDIR)),)
ifneq ($(DESTDIR),$(abspath /$(DESTDIR)))
@@ -21,18 +38,6 @@ ifneq ($(strip $(DESTDIR)),)
endif
###############################################################################
-# Configuration variables
-
-VERSION:= @@VERSION@@
-BINDIR := @@BINDIR@@
-LIBDIR := @@LIBDIR@@
-DOCDIR := @@DOCDIR@@
-MANDIR := @@MANDIR@@
-DATE := @@DATE@@
-LOCAL := @@LOCAL@@
-MAKE := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
-
-###############################################################################
# Global make rules
TARGETS := bin lib doc man