From: Ian Jackson Date: Sat, 12 Sep 2015 17:17:36 +0000 (+0000) Subject: Makefiles: Honour WIRINGPI_SUDO=0 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=wiringPi.git;a=commitdiff_plain;h=3ceb07a9a65b4bcbe54a80001522327cfdb9d91d Makefiles: Honour WIRINGPI_SUDO=0 This makes it possible for the caller of ./build to suppress the chown/chmod of the gpio utility. Signed-off-by: Ian Jackson --- diff --git a/gpio/Makefile b/gpio/Makefile index 095ec48..fa78421 100644 --- a/gpio/Makefile +++ b/gpio/Makefile @@ -73,8 +73,10 @@ tags: $(SRC) install: gpio $Q echo "[Install]" $Q cp gpio $(DESTDIR)$(PREFIX)/bin +ifneq ($(WIRINGPI_SUID),0) $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio +endif $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1 $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1