From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: nicolas.iooss@m4x.org, sds@tycho.nsa.gov
Cc: selinux@tycho.nsa.gov, Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [PATCH v5 13/15] semodule-utils: build: follow standard semantics for DESTDIR and PREFIX
Date: Wed, 14 Feb 2018 10:57:15 +0100 [thread overview]
Message-ID: <20180214095717.1050-14-marcus.folkesson@gmail.com> (raw)
In-Reply-To: <20180214095717.1050-1-marcus.folkesson@gmail.com>
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
Notes:
v5:
- Only use $(DESTDIR) in install
v2:
- Rework all packages (not just selinux/sepol/semanage)
semodule-utils/semodule_expand/Makefile | 12 +++++-------
semodule-utils/semodule_link/Makefile | 12 +++++-------
semodule-utils/semodule_package/Makefile | 16 +++++++---------
3 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/semodule-utils/semodule_expand/Makefile b/semodule-utils/semodule_expand/Makefile
index 072f2137..f1a1c8f3 100644
--- a/semodule-utils/semodule_expand/Makefile
+++ b/semodule-utils/semodule_expand/Makefile
@@ -1,8 +1,6 @@
# Installation directories.
-PREFIX ?= $(DESTDIR)/usr
-INCLUDEDIR ?= $(PREFIX)/include
+PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
-LIBDIR ?= $(PREFIX)/lib
MANDIR ?= $(PREFIX)/share/man
CFLAGS ?= -Werror -Wall -W
@@ -13,10 +11,10 @@ all: semodule_expand
semodule_expand: semodule_expand.o
install: all
- -mkdir -p $(BINDIR)
- install -m 755 semodule_expand $(BINDIR)
- test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
- install -m 644 semodule_expand.8 $(MANDIR)/man8/
+ -mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 755 semodule_expand $(DESTDIR)$(BINDIR)
+ test -d $(DESTDIR)$(MANDIR)/man8 || install -m 755 -d $(DESTDIR)$(MANDIR)/man8
+ install -m 644 semodule_expand.8 $(DESTDIR)$(MANDIR)/man8/
relabel:
diff --git a/semodule-utils/semodule_link/Makefile b/semodule-utils/semodule_link/Makefile
index cc4687bd..692cb026 100644
--- a/semodule-utils/semodule_link/Makefile
+++ b/semodule-utils/semodule_link/Makefile
@@ -1,9 +1,7 @@
# Installation directories.
-PREFIX ?= $(DESTDIR)/usr
-INCLUDEDIR ?= $(PREFIX)/include
+PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man
-LIBDIR ?= $(PREFIX)/lib
CFLAGS ?= -Werror -Wall -W
override LDLIBS += -lsepol
@@ -13,10 +11,10 @@ all: semodule_link
semodule_link: semodule_link.o
install: all
- -mkdir -p $(BINDIR)
- install -m 755 semodule_link $(BINDIR)
- test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
- install -m 644 semodule_link.8 $(MANDIR)/man8/
+ -mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 755 semodule_link $(DESTDIR)$(BINDIR)
+ test -d $(DESTDIR)$(MANDIR)/man8 || install -m 755 -d $(DESTDIR)$(MANDIR)/man8
+ install -m 644 semodule_link.8 $(DESTDIR)$(MANDIR)/man8/
relabel:
diff --git a/semodule-utils/semodule_package/Makefile b/semodule-utils/semodule_package/Makefile
index 96dd7c4f..da170267 100644
--- a/semodule-utils/semodule_package/Makefile
+++ b/semodule-utils/semodule_package/Makefile
@@ -1,8 +1,6 @@
# Installation directories.
-PREFIX ?= $(DESTDIR)/usr
-INCLUDEDIR ?= $(PREFIX)/include
+PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
-LIBDIR ?= $(PREFIX)/lib
MANDIR ?= $(PREFIX)/share/man
CFLAGS ?= -Werror -Wall -W
@@ -13,12 +11,12 @@ all: semodule_package semodule_unpackage
semodule_package: semodule_package.o
install: all
- -mkdir -p $(BINDIR)
- install -m 755 semodule_package $(BINDIR)
- install -m 755 semodule_unpackage $(BINDIR)
- test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
- install -m 644 semodule_package.8 $(MANDIR)/man8/
- install -m 644 semodule_unpackage.8 $(MANDIR)/man8/
+ -mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 755 semodule_package $(DESTDIR)$(BINDIR)
+ install -m 755 semodule_unpackage $(DESTDIR)$(BINDIR)
+ test -d $(DESTDIR)$(MANDIR)/man8 || install -m 755 -d $(DESTDIR)$(MANDIR)/man8
+ install -m 644 semodule_package.8 $(DESTDIR)$(MANDIR)/man8/
+ install -m 644 semodule_unpackage.8 $(DESTDIR)$(MANDIR)/man8/
relabel:
--
2.15.1
next prev parent reply other threads:[~2018-02-14 9:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 9:57 Rework of makefiles v5 Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 01/15] libsepol: build: follow standard semantics for DESTDIR and PREFIX Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 02/15] libselinux: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 03/15] libsemanage: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 04/15] checkpolicy: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 05/15] gui: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 06/15] mcstrans: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 07/15] policycoreutils: " Marcus Folkesson
2018-02-14 19:00 ` Nicolas Iooss
2018-02-14 9:57 ` [PATCH v5 08/15] python: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 09/15] python: build: move modules from platform-specific to platform-shared Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 10/15] restorecond: build: follow standard semantics for DESTDIR and PREFIX Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 11/15] sandbox: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 12/15] secilc: " Marcus Folkesson
2018-02-14 9:57 ` Marcus Folkesson [this message]
2018-02-14 9:57 ` [PATCH v5 14/15] dbus: " Marcus Folkesson
2018-02-14 9:57 ` [PATCH v5 15/15] build: setup buildpaths if DESTDIR is specified Marcus Folkesson
2018-02-14 19:19 ` Rework of makefiles v5 Nicolas Iooss
2018-02-15 13:04 ` Marcus Folkesson
2018-02-21 21:46 ` Nicolas Iooss
2018-02-22 19:19 ` Marcus Folkesson
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=20180214095717.1050-14-marcus.folkesson@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=nicolas.iooss@m4x.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.