aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris PeBenito <chpebeni@linux.microsoft.com>2020-07-27 10:00:37 -0400
committerJason Zaman <perfinion@gentoo.org>2020-10-11 13:00:16 -0700
commit2b3d0571e04480178c180c4ce07dc22e5ab10039 (patch)
tree26d611f9e86bc8c375778020f19bd9898075e84e /Makefile
parentMigrate gentoo-specific pid->runtime interfaces (diff)
downloadhardened-refpolicy-2b3d0571e04480178c180c4ce07dc22e5ab10039.tar.gz
hardened-refpolicy-2b3d0571e04480178c180c4ce07dc22e5ab10039.tar.bz2
hardened-refpolicy-2b3d0571e04480178c180c4ce07dc22e5ab10039.zip
Makefile: Give a value to build options so they can be used in ifelse.
Set build options to expand to "true". This will enable writing build options using m4 ifelse, for example: ifelse(`init_systemd',`true',` [init_systemd rules] ',`direct_sysadm_daemon',`true', [direct_sysadm_daemon rules] ',` dnl else [else rules] ') Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index f53f1278..a080759c 100644
--- a/Makefile
+++ b/Makefile
@@ -171,7 +171,7 @@ docsdir := $(prefix)/share/doc/$(PKGNAME)
# enable MLS if requested.
ifeq "$(TYPE)" "mls"
- M4PARAM += -D enable_mls
+ M4PARAM += -D enable_mls=true
CHECKPOLICY += -M
CHECKMODULE += -M
gennetfilter += -m
@@ -179,7 +179,7 @@ endif
# enable MLS if MCS requested.
ifeq "$(TYPE)" "mcs"
- M4PARAM += -D enable_mcs
+ M4PARAM += -D enable_mcs=true
CHECKPOLICY += -M
CHECKMODULE += -M
gennetfilter += -c
@@ -187,15 +187,15 @@ endif
# enable distribution-specific policy
ifneq ($(DISTRO),)
- M4PARAM += -D distro_$(DISTRO)
+ M4PARAM += -D distro_$(DISTRO)=true
endif
ifeq "$(DISTRO)" "ubuntu"
- M4PARAM += -D distro_debian
+ M4PARAM += -D distro_debian=true
endif
ifeq "$(SYSTEMD)" "y"
- M4PARAM += -D init_systemd
+ M4PARAM += -D init_systemd=true
endif
ifneq ($(OUTPUT_POLICY),)
@@ -203,7 +203,7 @@ ifneq ($(OUTPUT_POLICY),)
endif
ifneq "$(CUSTOM_BUILDOPT)" ""
- M4PARAM += $(foreach opt,$(CUSTOM_BUILDOPT),-D $(opt))
+ M4PARAM += $(foreach opt,$(CUSTOM_BUILDOPT),-D $(opt)=true)
endif
# if not set, use the type as the name.
@@ -213,15 +213,15 @@ NAME ?= $(TYPE)
UNK_PERMS ?= deny
ifeq ($(DIRECT_INITRC),y)
- M4PARAM += -D direct_sysadm_daemon
+ M4PARAM += -D direct_sysadm_daemon=true
endif
ifeq "$(WERROR)" "y"
- M4PARAM += -D m4_werror
+ M4PARAM += -D m4_werror=true
endif
ifeq "$(UBAC)" "y"
- M4PARAM += -D enable_ubac
+ M4PARAM += -D enable_ubac=true
endif
# default MLS/MCS sensitivity and category settings.
@@ -235,7 +235,7 @@ else
VERBOSE_FLAG = --verbose
endif
-M4PARAM += -D mls_num_sens=$(MLS_SENS) -D mls_num_cats=$(MLS_CATS) -D mcs_num_cats=$(MCS_CATS) -D hide_broken_symptoms
+M4PARAM += -D mls_num_sens=$(MLS_SENS) -D mls_num_cats=$(MLS_CATS) -D mcs_num_cats=$(MCS_CATS) -D hide_broken_symptoms=true
# we need exuberant ctags; unfortunately it is named
# differently on different distros