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>
This commit is contained in:
parent
aa6c3f4da3
commit
e167e1a4d4
20
Makefile
20
Makefile
@ -169,7 +169,7 @@ docsdir := $(prefix)/share/doc/$(PKGNAME)
|
|||||||
|
|
||||||
# enable MLS if requested.
|
# enable MLS if requested.
|
||||||
ifeq "$(TYPE)" "mls"
|
ifeq "$(TYPE)" "mls"
|
||||||
M4PARAM += -D enable_mls
|
M4PARAM += -D enable_mls=true
|
||||||
CHECKPOLICY += -M
|
CHECKPOLICY += -M
|
||||||
CHECKMODULE += -M
|
CHECKMODULE += -M
|
||||||
gennetfilter += -m
|
gennetfilter += -m
|
||||||
@ -177,7 +177,7 @@ endif
|
|||||||
|
|
||||||
# enable MLS if MCS requested.
|
# enable MLS if MCS requested.
|
||||||
ifeq "$(TYPE)" "mcs"
|
ifeq "$(TYPE)" "mcs"
|
||||||
M4PARAM += -D enable_mcs
|
M4PARAM += -D enable_mcs=true
|
||||||
CHECKPOLICY += -M
|
CHECKPOLICY += -M
|
||||||
CHECKMODULE += -M
|
CHECKMODULE += -M
|
||||||
gennetfilter += -c
|
gennetfilter += -c
|
||||||
@ -185,15 +185,15 @@ endif
|
|||||||
|
|
||||||
# enable distribution-specific policy
|
# enable distribution-specific policy
|
||||||
ifneq ($(DISTRO),)
|
ifneq ($(DISTRO),)
|
||||||
M4PARAM += -D distro_$(DISTRO)
|
M4PARAM += -D distro_$(DISTRO)=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(DISTRO)" "ubuntu"
|
ifeq "$(DISTRO)" "ubuntu"
|
||||||
M4PARAM += -D distro_debian
|
M4PARAM += -D distro_debian=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(SYSTEMD)" "y"
|
ifeq "$(SYSTEMD)" "y"
|
||||||
M4PARAM += -D init_systemd
|
M4PARAM += -D init_systemd=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(OUTPUT_POLICY),)
|
ifneq ($(OUTPUT_POLICY),)
|
||||||
@ -201,7 +201,7 @@ ifneq ($(OUTPUT_POLICY),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq "$(CUSTOM_BUILDOPT)" ""
|
ifneq "$(CUSTOM_BUILDOPT)" ""
|
||||||
M4PARAM += $(foreach opt,$(CUSTOM_BUILDOPT),-D $(opt))
|
M4PARAM += $(foreach opt,$(CUSTOM_BUILDOPT),-D $(opt)=true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# if not set, use the type as the name.
|
# if not set, use the type as the name.
|
||||||
@ -211,15 +211,15 @@ NAME ?= $(TYPE)
|
|||||||
UNK_PERMS ?= deny
|
UNK_PERMS ?= deny
|
||||||
|
|
||||||
ifeq ($(DIRECT_INITRC),y)
|
ifeq ($(DIRECT_INITRC),y)
|
||||||
M4PARAM += -D direct_sysadm_daemon
|
M4PARAM += -D direct_sysadm_daemon=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(WERROR)" "y"
|
ifeq "$(WERROR)" "y"
|
||||||
M4PARAM += -D m4_werror
|
M4PARAM += -D m4_werror=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(UBAC)" "y"
|
ifeq "$(UBAC)" "y"
|
||||||
M4PARAM += -D enable_ubac
|
M4PARAM += -D enable_ubac=true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# default MLS/MCS sensitivity and category settings.
|
# default MLS/MCS sensitivity and category settings.
|
||||||
@ -233,7 +233,7 @@ else
|
|||||||
VERBOSE_FLAG = --verbose
|
VERBOSE_FLAG = --verbose
|
||||||
endif
|
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
|
# we need exuberant ctags; unfortunately it is named
|
||||||
# differently on different distros
|
# differently on different distros
|
||||||
|
Loading…
Reference in New Issue
Block a user