From cf6f38107e9d0f656ac8f1d3f99121781a7ed17c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 9 Sep 2015 23:34:18 +0000 Subject: [PATCH] Build system: Add a formulaic setting of Q from V for debugging We want to be able to disable the many @'s in the Makefiles so that we can see what they are doing, when things go wrong. It is conventional to arrange for setting V=1 to have this effect. Here we supply a formulaic stanza for either setting Q?=@ or doing nothing. (There is sadly no standard place which is included in all the Makefiles so this is probably best). In this patch we do not introduce any users of Q yet. This is because the next patch, which introduces all the users of Q, can be generated entirely automatically. (This is also convenient in case something needs to be rebased across it.) Signed-off-by: Ian Jackson --- devLib/Makefile | 4 ++++ examples/Gertboard/Makefile | 4 ++++ examples/Makefile | 3 +++ examples/PiFace/Makefile | 3 +++ examples/PiGlow/Makefile | 3 +++ examples/q2w/Makefile | 3 +++ gpio/Makefile | 4 ++++ pins/Makefile | 4 ++++ wiringPi/Makefile | 4 ++++ 9 files changed, 32 insertions(+) diff --git a/devLib/Makefile b/devLib/Makefile index d62b532..21ea512 100644 --- a/devLib/Makefile +++ b/devLib/Makefile @@ -25,6 +25,10 @@ VERSION=$(shell cat ../VERSION) DESTDIR=/usr PREFIX=/local +ifneq ($V,1) +Q ?= @ +endif + STATIC=libwiringPiDev.a DYNAMIC=libwiringPiDev.so.$(VERSION) diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile index 7569261..7be81ab 100644 --- a/examples/Gertboard/Makefile +++ b/examples/Gertboard/Makefile @@ -5,6 +5,10 @@ # Copyright (c) 2013 Gordon Henderson ################################################################################# +ifneq ($V,1) +Q ?= @ +endif + #DEBUG = -g -O0 DEBUG = -O3 CC = gcc diff --git a/examples/Makefile b/examples/Makefile index c9967dc..7671b08 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -22,6 +22,9 @@ # along with wiringPi. If not, see . ################################################################################# +ifneq ($V,1) +Q ?= @ +endif #DEBUG = -g -O0 DEBUG = -O3 diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile index 0bde334..7bab7ce 100644 --- a/examples/PiFace/Makefile +++ b/examples/PiFace/Makefile @@ -22,6 +22,9 @@ # along with wiringPi. If not, see . ################################################################################# +ifneq ($V,1) +Q ?= @ +endif #DEBUG = -g -O0 DEBUG = -O3 diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile index 8d31141..6d8d5bf 100644 --- a/examples/PiGlow/Makefile +++ b/examples/PiGlow/Makefile @@ -22,6 +22,9 @@ # along with wiringPi. If not, see . ################################################################################# +ifneq ($V,1) +Q ?= @ +endif #DEBUG = -g -O0 DEBUG = -O3 diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile index 150c825..a7bc337 100644 --- a/examples/q2w/Makefile +++ b/examples/q2w/Makefile @@ -22,6 +22,9 @@ # along with wiringPi. If not, see . ################################################################################# +ifneq ($V,1) +Q ?= @ +endif #DEBUG = -g -O0 DEBUG = -O3 diff --git a/gpio/Makefile b/gpio/Makefile index 449986e..df05dbe 100644 --- a/gpio/Makefile +++ b/gpio/Makefile @@ -26,6 +26,10 @@ DESTDIR=/usr PREFIX=/local +ifneq ($V,1) +Q ?= @ +endif + #DEBUG = -g -O0 DEBUG = -O2 CC = gcc diff --git a/pins/Makefile b/pins/Makefile index fd34ee9..649961b 100644 --- a/pins/Makefile +++ b/pins/Makefile @@ -1,6 +1,10 @@ SRC = pins.tex +ifneq ($V,1) +Q ?= @ +endif + all: ${SRC} @echo Generating DVI diff --git a/wiringPi/Makefile b/wiringPi/Makefile index 015a894..a04f907 100644 --- a/wiringPi/Makefile +++ b/wiringPi/Makefile @@ -25,6 +25,10 @@ VERSION=$(shell cat ../VERSION) DESTDIR=/usr PREFIX=/local +ifneq ($V,1) +Q ?= @ +endif + STATIC=libwiringPi.a DYNAMIC=libwiringPi.so.$(VERSION) -- 2.30.2