]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Deactivate implicit make rules.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 3 Oct 2015 01:58:43 +0000 (01:58 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Jan 2016 11:58:52 +0000 (12:58 +0100)
Without this, make might execute commands defined by implicit
rules. This can cause subtle build errors that are hard to debug.

To make this work we need to define CC though, and RM must not be
defined through the =? operator.

Makefile.real
t/makefile.test

index 59579e27cda64920d50184776eb71143768199f3..ee0bf447b53eb5ae957d63fb8977a0d7a5a85538 100644 (file)
@@ -1,3 +1,12 @@
+# Implicit rules are implemented in make as suffix rules. The following rule
+# empties the suffix list to disable the predefined implicit rules. This
+# increases performance and avoids hard-to-debug behaviour.
+.SUFFIXES:
+MAKEFLAGS += -Rr
+ifeq ("$(origin CC)", "default")
+        CC := cc
+endif
+
 vardir := /var/paraslash
 mandir := $(datarootdir)/man/man1
 STRIP := $(CROSS_COMPILE)strip
index 6ef9ac84862be90980474f699911421140fc6618..15bb6859b1c2e668245bf0663bc57d7593710f83 100644 (file)
@@ -1,4 +1,4 @@
-RM ?= rm -f
+RM = rm -f
 
 results_dir := $(test_dir)/test-results
 trash_dir := $(test_dir)/trashes