From 4a595fcf0177772ea563c0d6fe40b0d2b6ee2bb7 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 22 Sep 2023 19:36:30 +0200 Subject: [PATCH] MT#58307 build: Normalize variable handling Make it conform to common expectations, where: - Do not include DESTDIR as part of prefix, use it instead on the install target. Change-Id: I0dae0933b86b1dfcebbe80542881e51b7fd826f0 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 49885be..fd5357e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile to generate dhtest -prefix?=$(DESTDIR)/usr +prefix ?= /usr CC=gcc CFLAGS?=-g -O3 -Wall -Wextra CFLAGS+=--std=c99 -D_POSIX_SOURCE -D_DEFAULT_SOURCE @@ -11,8 +11,8 @@ dhtest: dhtest.o functions.o $(CC) dhtest.o functions.o -o dhtest install: dhtest - install -d $(prefix)/sbin - install -m 0755 dhtest $(prefix)/sbin + install -d $(DESTDIR)$(prefix)/sbin + install -m 0755 dhtest $(DESTDIR)$(prefix)/sbin clean: rm -f dhtest functions.o dhtest.o