apparmor/utils/vim/Makefile
Christian Boltz 0f891ba30e
Delete (possibly broken) apparmor.vim on failure
If create-apparmor.vim.py fails, an empty apparmor.vim gets created. The
next "make" run will assume that apparmor.vim was already created (the
file exists and has a new-enough timestamp) and will therefore skip the
create-apparmor.vim.py run, keeping the broken apparmor.vim forever.

Adjust the Makefile to delete apparmor.vim if the script fails. This
ensures that make tries again in the next run.
2020-04-05 14:31:33 +02:00

29 lines
681 B
Makefile

COMMONDIR=../../common/
all:
include $(COMMONDIR)/Make.rules
MANPAGES=apparmor.vim.5
VIM_INSTALL_PATH=${DESTDIR}/usr/share/apparmor
all: apparmor.vim manpages htmlmanpages
apparmor.vim: apparmor.vim.in Makefile create-apparmor.vim.py
${PYTHON} create-apparmor.vim.py > apparmor.vim || { rm -f apparmor.vim ; exit 1; }
manpages: $(MANPAGES)
htmlmanpages: $(HTMLMANPAGES)
install: apparmor.vim manpages
install -d $(VIM_INSTALL_PATH)
install -m 644 $< $(VIM_INSTALL_PATH)
$(MAKE) install_manpages DESTDIR=${DESTDIR}
.PHONY: check
check: check_pod_files
#Testing with all pythons
$(call pyalldo, create-apparmor.vim.py > /dev/null)
clean: pod_clean
rm -f apparmor.vim