From 483ef7844b3410c6c53708f1413570cb72a07596 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 30 Jun 2025 16:03:36 +0200 Subject: [PATCH] also test DESTDIR --- Makefile | 8 ++++++-- src/Makefile | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1f7af1087..222fea5ac 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,9 @@ zip: install: ifndef PREFIX - $(error Error: PREFIX must be set for install to work) +ifndef DESTDIR + $(error Error: PREFIX or DESTDIR must be set for install to work) +endif endif @$(MAKE) -C src --no-print-directory $@ @$(MAKE) -C libsrc --no-print-directory $@ @@ -73,7 +75,9 @@ util: checkprefix: ifndef PREFIX - $(warning Warning: PREFIX is empty - make install will not work) +ifndef DESTDIR + $(warning Warning: PREFIX and DESTDIR are empty - make install will not work) +endif endif # check the code style diff --git a/src/Makefile b/src/Makefile index 366e50183..f652f6925 100644 --- a/src/Makefile +++ b/src/Makefile @@ -103,7 +103,9 @@ endif all bin: $(PROGS) ifeq ($(MAKELEVEL),0) ifndef PREFIX - $(warning Warning: PREFIX is empty - make install will not work) +ifndef DESTDIR + $(warning Warning: PREFIX and DESTDIR are empty - make install will not work) +endif endif endif