forked from topjohnwu/selinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol: build: follow standard semantics for DESTDIR and PREFIX
This patch solves the following issues: - The pkg-config files generates odd paths when using DESTDIR without PREFIX - DESTDIR is needed during compile time to compute library and header paths which it should not. - Installing with both DESTDIR and PREFIX set gives us odd paths - Make usage of DESTDIR and PREFIX more standard Signed-off-by: Marcus Folkesson <[email protected]>
- Loading branch information
1 parent
f281fc5
commit f8532f1
Showing
6 changed files
with
31 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Installation directories. | ||
PREFIX ?= $(DESTDIR)/usr | ||
INCDIR ?= $(PREFIX)/include/sepol | ||
PREFIX ?= /usr | ||
INCDIR = $(PREFIX)/include/sepol | ||
CILDIR ?= ../cil | ||
|
||
all: | ||
|
||
install: all | ||
test -d $(INCDIR) || install -m 755 -d $(INCDIR) | ||
test -d $(INCDIR)/policydb || install -m 755 -d $(INCDIR)/policydb | ||
test -d $(INCDIR)/cil || install -m 755 -d $(INCDIR)/cil | ||
install -m 644 $(wildcard sepol/*.h) $(INCDIR) | ||
install -m 644 $(wildcard sepol/policydb/*.h) $(INCDIR)/policydb | ||
install -m 644 $(wildcard $(CILDIR)/include/cil/*.h) $(INCDIR)/cil | ||
test -d $(DESTDIR)$(INCDIR) || install -m 755 -d $(DESTDIR)$(INCDIR) | ||
test -d $(DESTDIR)$(INCDIR)/policydb || install -m 755 -d $(DESTDIR)$(INCDIR)/policydb | ||
test -d $(DESTDIR)$(INCDIR)/cil || install -m 755 -d $(DESTDIR)$(INCDIR)/cil | ||
install -m 644 $(wildcard sepol/*.h) $(DESTDIR)$(INCDIR) | ||
install -m 644 $(wildcard sepol/policydb/*.h) $(DESTDIR)$(INCDIR)/policydb | ||
install -m 644 $(wildcard $(CILDIR)/include/cil/*.h) $(DESTDIR)$(INCDIR)/cil | ||
|
||
indent: | ||
../../scripts/Lindent $(wildcard sepol/*.h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# Installation directories. | ||
MAN8DIR ?= $(DESTDIR)/usr/share/man/man8 | ||
MAN3DIR ?= $(DESTDIR)/usr/share/man/man3 | ||
PREFIX ?= /usr | ||
MAN8DIR ?= $(PREFIX)/share/man/man8 | ||
MAN3DIR ?= $(PREFIX)/share/man/man3 | ||
|
||
all: | ||
|
||
install: all | ||
mkdir -p $(MAN3DIR) | ||
mkdir -p $(MAN8DIR) | ||
install -m 644 man3/*.3 $(MAN3DIR) | ||
install -m 644 man8/*.8 $(MAN8DIR) | ||
mkdir -p $(DESTDIR)$(MAN3DIR) | ||
mkdir -p $(DESTDIR)$(MAN8DIR) | ||
install -m 644 man3/*.3 $(DESTDIR)$(MAN3DIR) | ||
install -m 644 man8/*.8 $(DESTDIR)$(MAN8DIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters