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.
This commit is contained in:
Christian Boltz 2020-04-05 14:31:33 +02:00
parent 9e7c4f88f9
commit 0f891ba30e
Failed to generate hash of commit

View file

@ -9,7 +9,7 @@ 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
${PYTHON} create-apparmor.vim.py > apparmor.vim || { rm -f apparmor.vim ; exit 1; }
manpages: $(MANPAGES)