File: Makefile

package info (click to toggle)
policycoreutils 3.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: ansic: 4,848; sh: 591; makefile: 497; perl: 20
file content (47 lines) | stat: -rw-r--r-- 1,582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Installation directories.
LINGUAS ?=
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
SBINDIR ?= $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
ETCDIR ?= /etc

CFLAGS ?= -Werror -Wall -W
override CFLAGS += -I../../libselinux/include -D_FILE_OFFSET_BITS=64
override LDFLAGS+= -L../../libselinux/src
override LDLIBS += $(LIBSELINUX_LDLIBS)

all: sestatus

sestatus: sestatus.o

install: all
	[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
	[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
	-mkdir -p $(DESTDIR)$(BINDIR)
	-mkdir -p $(DESTDIR)$(SBINDIR)
	# Some tools hard code /usr/sbin/sestatus ; add a compatibility symlink
	# install will overwrite a symlink, so create the symlink before calling
	# install to allow distributions with BINDIR == SBINDIR
	ln -sf --relative $(DESTDIR)$(BINDIR)/sestatus $(DESTDIR)$(SBINDIR)
	install -m 755 sestatus $(DESTDIR)$(BINDIR)
	install -m 644 sestatus.8 $(DESTDIR)$(MANDIR)/man8
	install -m 644 sestatus.conf.5 $(DESTDIR)$(MANDIR)/man5
	for lang in $(LINGUAS) ; do \
		if [ -e $${lang} ] ; then \
			[ -d $(DESTDIR)$(MANDIR)/$${lang}/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
			[ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
			install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
		fi ; \
	done
	-mkdir -p $(DESTDIR)$(ETCDIR)
	install -m 644 sestatus.conf $(DESTDIR)$(ETCDIR)

clean:
	rm -f sestatus *.o

indent:
	../../scripts/Lindent $(wildcard *.[ch])

relabel: