From 7485ef7ea76107953ceb0f7dff3d3dd90803c2d0 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Fri, 17 May 2024 08:39:02 +0200 Subject: Don't encourage building with root privileges --- .gitlab-ci.yml | 1 + Makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96f63e8..acea3ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,7 @@ install: - apt update - apt install make help2man script: + - make - make DESTDIR=out PREFIX= install - make DESTDIR=out PREFIX= uninstall - make clean diff --git a/Makefile b/Makefile index 7da46b1..5694a25 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,10 @@ man-%: build --include=docs/help2man/reporting-bugs.help2man \ -o build/$*.1 build/$* -install: all +# Let this fail if the user did not run make yet (because the build never +# requires sudo, whereas this part may require it depending on location). +.PHONY: install +install: @mkdir -p $(DESTDIR)$(BINDIR) @mkdir -p $(DESTDIR)$(MANDIR)/man1 install -m 755 $(patsubst %,build/%,$(PROGRAMS)) $(DESTDIR)$(BINDIR) -- cgit v1.2.3