Add ctags Make target from Thomas Bleher.
This commit is contained in:
parent
a524921aa4
commit
37227dcd94
|
@ -1,3 +1,4 @@
|
|||
- Add ctags Make target from Thomas Bleher.
|
||||
- Collapse commands with grep piped to sed into one sed command.
|
||||
- Fix type_change bug in term_user_pty().
|
||||
- Move ice_tmp_t from miscfiles to xserver.
|
||||
|
|
|
@ -128,6 +128,20 @@ endif
|
|||
|
||||
override M4PARAM += -D hide_broken_symptoms
|
||||
|
||||
# we need exuberant ctags; unfortunately it is named
|
||||
# differently on different distros
|
||||
ifeq ($(DISTRO),debian)
|
||||
CTAGS := ctags-exuberant
|
||||
endif
|
||||
|
||||
ifeq ($(DISTRO),gentoo)
|
||||
CTAGS := exuberant-ctags
|
||||
endif
|
||||
|
||||
ifeq ($(CTAGS),)
|
||||
CTAGS := ctags
|
||||
endif
|
||||
|
||||
# determine the policy version and current kernel version if possible
|
||||
PV := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
|
||||
KV := $(shell cat /selinux/policyvers)
|
||||
|
@ -317,6 +331,20 @@ install-src:
|
|||
mkdir -p $(SRCPATH)/policy
|
||||
cp -R . $(SRCPATH)/policy
|
||||
|
||||
########################################
|
||||
#
|
||||
# Generate tags file
|
||||
#
|
||||
tags:
|
||||
@($(CTAGS) --version | grep -q Exuberant) || (echo ERROR: Need exuberant-ctags to function!; exit 1)
|
||||
@LC_ALL=C $(CTAGS) --langdef=te --langmap=te:..te.if.spt \
|
||||
--regex-te='/^type[ \t]+(\w+)(,|;)/\1/t,type/' \
|
||||
--regex-te='/^typealias[ \t]+\w+[ \t+]+alias[ \t]+(\w+);/\1/t,type/' \
|
||||
--regex-te='/^attribute[ \t]+(\w+);/\1/a,attribute/' \
|
||||
--regex-te='/^[ \t]*define\(`(\w+)/\1/d,define/' \
|
||||
--regex-te='/^[ \t]*interface\(`(\w+)/\1/i,interface/' \
|
||||
--regex-te='/^[ \t]*bool[ \t]+(\w+)/\1/b,bool/' policy/modules/*/*.{if,te} policy/support/*.spt
|
||||
|
||||
########################################
|
||||
#
|
||||
# Clean everything
|
||||
|
@ -328,6 +356,7 @@ bare: clean
|
|||
rm -f $(MOD_CONF)
|
||||
rm -f $(BOOLEANS)
|
||||
rm -fR $(HTMLDIR)
|
||||
rm -f tags
|
||||
ifneq ($(GENERATED_TE),)
|
||||
rm -f $(GENERATED_TE)
|
||||
endif
|
||||
|
@ -338,6 +367,6 @@ ifneq ($(GENERATED_FC),)
|
|||
rm -f $(GENERATED_FC)
|
||||
endif
|
||||
|
||||
.PHONY: install-src install-appconfig conf html bare
|
||||
.PHONY: install-src install-appconfig conf html bare tags
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c
|
||||
|
|
Loading…
Reference in New Issue