aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcgzones <cgzones@googlemail.com>2016-11-29 18:08:29 +0100
committerJason Zaman <jason@perfinion.com>2016-12-06 20:39:33 +0800
commitecac4bbff4fd920ed300be120b9af3f5f7f39b44 (patch)
treead9a89222a5e64868e0e865161c7e4ab2d76e9d6 /Makefile
parentfix spelling (diff)
downloadhardened-refpolicy-ecac4bbff4fd920ed300be120b9af3f5f7f39b44.tar.gz
hardened-refpolicy-ecac4bbff4fd920ed300be120b9af3f5f7f39b44.tar.bz2
hardened-refpolicy-ecac4bbff4fd920ed300be120b9af3f5f7f39b44.zip
update Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile94
1 files changed, 49 insertions, 45 deletions
diff --git a/Makefile b/Makefile
index b570ff10..9295b180 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ ifdef LOCAL_ROOT
endif
# refpolicy version
-version = $(shell cat VERSION)
+version := $(shell cat VERSION)
ifdef LOCAL_ROOT
builddir := $(LOCAL_ROOT)/
@@ -70,13 +70,13 @@ SECHECK ?= $(BINDIR)/sechecker
AWK ?= gawk
GREP ?= egrep
INSTALL ?= install
-M4 ?= m4
-PYTHON ?= python
+M4 ?= m4 -E -E
+PYTHON ?= python -t -t
SED ?= sed
SORT ?= LC_ALL=C sort
UMASK ?= umask
-CFLAGS += -Wall
+CFLAGS += -Wall -Wextra -O2
# policy source layout
poldir := policy
@@ -112,60 +112,60 @@ genhomedircon := $(PYTHON) -E $(support)/genhomedircon
# documentation paths
docs := doc
-xmldtd = $(docs)/policy.dtd
-metaxml = metadata.xml
-doctemplate = $(docs)/templates
-docfiles = $(docs)/Makefile.example $(addprefix $(docs)/,example.te example.if example.fc)
+xmldtd := $(docs)/policy.dtd
+metaxml := metadata.xml
+doctemplate := $(docs)/templates
+docfiles := $(docs)/Makefile.example $(addprefix $(docs)/,example.te example.if example.fc)
ifndef LOCAL_ROOT
-polxml = $(docs)/policy.xml
-tunxml = $(docs)/global_tunables.xml
-gentooxml = $(docs)/gentoo_tunables.xml
-boolxml = $(docs)/global_booleans.xml
-htmldir = $(docs)/html
+polxml := $(docs)/policy.xml
+tunxml := $(docs)/global_tunables.xml
+gentooxml := $(docs)/gentoo_tunables.xml
+boolxml := $(docs)/global_booleans.xml
+htmldir := $(docs)/html
else
-polxml = $(LOCAL_ROOT)/doc/policy.xml
-tunxml = $(LOCAL_ROOT)/doc/global_tunables.xml
-gentooxml = $(LOCAL_ROOT)/doc/gentoo_tunables.xml
-boolxml = $(LOCAL_ROOT)/doc/global_booleans.xml
-htmldir = $(LOCAL_ROOT)/doc/html
+polxml := $(LOCAL_ROOT)/doc/policy.xml
+tunxml := $(LOCAL_ROOT)/doc/global_tunables.xml
+gentooxml := $(LOCAL_ROOT)/doc/gentoo_tunables.xml
+boolxml := $(LOCAL_ROOT)/doc/global_booleans.xml
+htmldir := $(LOCAL_ROOT)/doc/html
endif
# config file paths
-globaltun = $(poldir)/global_tunables
-globalbool = $(poldir)/global_booleans
+globaltun := $(poldir)/global_tunables
+globalbool := $(poldir)/global_booleans
user_files := $(poldir)/users
policycaps := $(poldir)/policy_capabilities
ctx_defaults := $(poldir)/context_defaults
# local config file paths
ifndef LOCAL_ROOT
-mod_conf = $(poldir)/modules.conf
-booleans = $(poldir)/booleans.conf
-tunables = $(poldir)/tunables.conf
+mod_conf := $(poldir)/modules.conf
+booleans := $(poldir)/booleans.conf
+tunables := $(poldir)/tunables.conf
else
-mod_conf = $(local_poldir)/modules.conf
-booleans = $(local_poldir)/booleans.conf
-tunables = $(local_poldir)/tunables.conf
+mod_conf := $(local_poldir)/modules.conf
+booleans := $(local_poldir)/booleans.conf
+tunables := $(local_poldir)/tunables.conf
endif
# install paths
PKGNAME ?= refpolicy-$(version)
-prefix = $(DESTDIR)/usr
-topdir = $(DESTDIR)/etc/selinux
-installdir = $(topdir)/$(strip $(NAME))
-srcpath = $(installdir)/src
-userpath = $(installdir)/users
-policypath = $(installdir)/policy
-contextpath = $(installdir)/contexts
-homedirpath = $(contextpath)/files/homedir_template
-fcpath = $(contextpath)/files/file_contexts
-fcsubspath = $(contextpath)/files/file_contexts.subs_dist
-ncpath = $(contextpath)/netfilter_contexts
-sharedir = $(prefix)/share/selinux
-modpkgdir = $(sharedir)/$(strip $(NAME))
-headerdir = $(modpkgdir)/include
-docsdir = $(prefix)/share/doc/$(PKGNAME)
+prefix := $(DESTDIR)/usr
+topdir := $(DESTDIR)/etc/selinux
+installdir := $(topdir)/$(strip $(NAME))
+srcpath := $(installdir)/src
+userpath := $(installdir)/users
+policypath := $(installdir)/policy
+contextpath := $(installdir)/contexts
+homedirpath := $(contextpath)/files/homedir_template
+fcpath := $(contextpath)/files/file_contexts
+fcsubspath := $(contextpath)/files/file_contexts.subs_dist
+ncpath := $(contextpath)/netfilter_contexts
+sharedir := $(prefix)/share/selinux
+modpkgdir := $(sharedir)/$(strip $(NAME))
+headerdir := $(modpkgdir)/include
+docsdir := $(prefix)/share/doc/$(PKGNAME)
# enable MLS if requested.
ifeq "$(TYPE)" "mls"
@@ -391,11 +391,15 @@ $(net_contexts): $(moddir)/kernel/corenetwork.te.in
#
# Create config files
#
-conf: $(mod_conf) $(booleans) $(generated_te) $(generated_if) $(generated_fc)
+conf: $(mod_conf) $(booleans) generate
-$(mod_conf) $(booleans): $(polxml)
- @echo "Updating $(mod_conf) and $(booleans)"
- $(verbose) $(gendoc) -b $(booleans) -m $(mod_conf) -x $(polxml)
+$(booleans): $(polxml)
+ @echo "Updating $(booleans)"
+ $(verbose) $(gendoc) -b $(booleans) -x $(polxml)
+
+$(mod_conf): $(polxml)
+ @echo "Updating $(mod_conf)"
+ $(verbose) $(gendoc) -m $(mod_conf) -x $(polxml)
########################################
#