Skip to content

Commit

Permalink
makefile: add install target for udica templates
Browse files Browse the repository at this point in the history
  • Loading branch information
0xC0ncord committed May 7, 2022
1 parent cfd00e7 commit ec9d665
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ htmldir := $(LOCAL_ROOT)/doc/html
doctmpdir := $(LOCAL_ROOT)/doc/tmp
endif

# udica templates path
udicatemplates := udica-templates

# config file paths
globaltun := $(poldir)/global_tunables
globalbool := $(poldir)/global_booleans
Expand Down Expand Up @@ -167,6 +170,7 @@ sharedir := $(prefix)/share/selinux
modpkgdir := $(sharedir)/$(strip $(NAME))
headerdir := $(modpkgdir)/include
docsdir := $(prefix)/share/doc/$(PKGNAME)
udicatemplatesdir := $(prefix)/share/udica/templates

# enable MLS if requested.
ifeq "$(TYPE)" "mls"
Expand Down Expand Up @@ -590,6 +594,15 @@ install-src:
mkdir -p $(srcpath)/policy
cp -R . $(srcpath)/policy

########################################
#
# Install udica templates
#
install-udica-templates:
@mkdir -p $(udicatemplatesdir)
@echo "Installing udica templates"
$(verbose) $(INSTALL) -m 644 $(wildcard $(udicatemplates)/*) $(udicatemplatesdir)

########################################
#
# Generate tags file
Expand Down Expand Up @@ -655,6 +668,7 @@ bare: clean
$(verbose) rm -f $(mod_conf)
$(verbose) rm -f $(booleans)
$(verbose) rm -fR $(htmldir)
$(verbose) rm -fR $(udicatemplatesdir)
$(verbose) rm -f $(tags)
# don't remove these files if we're given a local root
ifndef LOCAL_ROOT
Expand All @@ -671,4 +685,4 @@ ifneq ($(generated_fc),)
endif
endif

.PHONY: install-src install-appconfig install-headers build-interface-db generate xml conf html bare tags
.PHONY: install-src install-appconfig install-headers install-udica-templates build-interface-db generate xml conf html bare tags

0 comments on commit ec9d665

Please sign in to comment.