public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top
Subject: [PATCH 6/6] Makefile: Spell prefix as PREFIX
Date: Tue, 14 Jun 2022 15:12:26 +1000	[thread overview]
Message-ID: <20220614051226.195541-7-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20220614051226.195541-1-david@gibson.dropbear.id.au>

[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]

Makefile conventions (at least in the GNUish world) tend to control the
base install directory with the variable $(PREFIX) (all caps).  The passt
Makefile has the same thing but in lower case $(prefix).  Capitalize it to
match conventions.

Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
---
 Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index b0dde68..c334605 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec
 	CFLAGS += -fstack-protector-strong
 endif
 
-prefix ?= /usr/local
+PREFIX ?= /usr/local
 
 ifeq ($(TARGET_ARCH),X86_64)
 BIN := passt passt.avx2 pasta pasta.avx2 qrap
@@ -125,13 +125,13 @@ clean:
 		passt.tar passt.tar.gz *.deb *.rpm
 
 install: $(BIN) $(MANPAGES)
-	mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/share/man/man1
-	cp -d $(BIN) $(DESTDIR)$(prefix)/bin
-	cp -d $(MANPAGES) $(DESTDIR)$(prefix)/share/man/man1
+	mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
+	cp -d $(BIN) $(DESTDIR)$(PREFIX)/bin
+	cp -d $(MANPAGES) $(DESTDIR)$(PREFIX)/share/man/man1
 
 uninstall:
-	$(RM) $(BIN:%=$(DESTDIR)$(prefix)/bin/%)
-	$(RM) $(MANPAGES:%=$(DESTDIR)$(prefix)/share/man/man1/%)
+	$(RM) $(BIN:%=$(DESTDIR)$(PREFIX)/bin/%)
+	$(RM) $(MANPAGES:%=$(DESTDIR)$(PREFIX)/share/man/man1/%)
 
 pkgs: static
 	tar cf passt.tar -P --xform 's//\/usr\/bin\//' $(BIN)
-- 
@@ -82,7 +82,7 @@ ifeq ($(shell :|$(CC) -fstack-protector-strong -S -xc - -o - >/dev/null 2>&1; ec
 	CFLAGS += -fstack-protector-strong
 endif
 
-prefix ?= /usr/local
+PREFIX ?= /usr/local
 
 ifeq ($(TARGET_ARCH),X86_64)
 BIN := passt passt.avx2 pasta pasta.avx2 qrap
@@ -125,13 +125,13 @@ clean:
 		passt.tar passt.tar.gz *.deb *.rpm
 
 install: $(BIN) $(MANPAGES)
-	mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/share/man/man1
-	cp -d $(BIN) $(DESTDIR)$(prefix)/bin
-	cp -d $(MANPAGES) $(DESTDIR)$(prefix)/share/man/man1
+	mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
+	cp -d $(BIN) $(DESTDIR)$(PREFIX)/bin
+	cp -d $(MANPAGES) $(DESTDIR)$(PREFIX)/share/man/man1
 
 uninstall:
-	$(RM) $(BIN:%=$(DESTDIR)$(prefix)/bin/%)
-	$(RM) $(MANPAGES:%=$(DESTDIR)$(prefix)/share/man/man1/%)
+	$(RM) $(BIN:%=$(DESTDIR)$(PREFIX)/bin/%)
+	$(RM) $(MANPAGES:%=$(DESTDIR)$(PREFIX)/share/man/man1/%)
 
 pkgs: static
 	tar cf passt.tar -P --xform 's//\/usr\/bin\//' $(BIN)
-- 
2.36.1


  parent reply	other threads:[~2022-06-14  5:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  5:12 [PATCH 0/6] Assorted makefile cleanups David Gibson
2022-06-14  5:12 ` [PATCH 1/6] Makefile: Avoid using wildcard sources David Gibson
2022-06-14 14:45   ` Stefano Brivio
2022-06-14  5:12 ` [PATCH 2/6] Makefile: Use $(BIN) and $(MANPAGES) variable to simplify several targets David Gibson
2022-06-16 14:06   ` Stefano Brivio
2022-06-14  5:12 ` [PATCH 3/6] Makefile: Simplify pasta* targets with a pattern rule David Gibson
2022-06-14  5:12 ` [PATCH 4/6] Makefile: Tweak $(RM) usage David Gibson
2022-06-14  5:12 ` [PATCH 5/6] Makefile: Don't create extraneous -.s file David Gibson
2022-06-14  5:12 ` David Gibson [this message]
2022-06-14 14:45   ` [PATCH 6/6] Makefile: Spell prefix as PREFIX Stefano Brivio
2022-06-15  0:42     ` David Gibson
2022-06-20  7:44 ` [PATCH 0/6] Assorted makefile cleanups Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220614051226.195541-7-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).