[apparmor] [patch] utils: make html version of apparmor.vim manpage

Steve Beattie steve at nxnw.org
Tue Oct 14 23:52:36 UTC 2014


Bug: https://bugs.launchpad.net/bugs/1366572

In the move of the apparmor.vim manpage source from the parser directory
to utils/vim/, the creation of the html version of the manpage was lost.
This patch fixes that, as well as fixes the vim Makefile to use the
common/Make.rules _clean target (which clears the pod2htm*.tmp files
created by pod2html as well), and fixes a bug where the _clean target
would report an error when used in a directory where the Makefile
doesn't set the NAME variable.

(For whatever reason, none of the upstream install targets install the
html manpages anywhere, so downstreams that want to include them need to
install them manually. :/ I seem to recall this being because some
downstreams didn't want the html versions by default.)

Signed-off-by: Steve Beattie <steve at nxnw.org>
---
 common/Make.rules  |    2 +-
 utils/vim/Makefile |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

Index: b/utils/vim/Makefile
===================================================================
--- a/utils/vim/Makefile
+++ b/utils/vim/Makefile
@@ -12,13 +12,15 @@ endif
 MANPAGES=apparmor.vim.5
 VIM_INSTALL_PATH=${DESTDIR}/usr/share/apparmor
 
-all: apparmor.vim manpages
+all: apparmor.vim manpages htmlmanpages
 
 apparmor.vim: apparmor.vim.in Makefile create-apparmor.vim.py
 	${PYTHON} create-apparmor.vim.py > apparmor.vim
 
 manpages: $(MANPAGES)
 
+htmlmanpages: $(HTMLMANPAGES)
+
 install: apparmor.vim manpages
 	install -d $(VIM_INSTALL_PATH)
 	install -m 644 $< $(VIM_INSTALL_PATH)
@@ -29,5 +31,5 @@ check: check_pod_files
 	#Testing with all pythons
 	$(call pyalldo, create-apparmor.vim.py > /dev/null)
 
-clean:
-	rm -f apparmor.vim common $(MANPAGES)
+clean: _clean
+	rm -f apparmor.vim common
Index: b/common/Make.rules
===================================================================
--- a/common/Make.rules
+++ b/common/Make.rules
@@ -172,7 +172,7 @@ $(BUILDRPMSUBDIRS):
 .PHONY: _clean
 .SILENT: _clean
 _clean:
-	-rm -f ${NAME}-${VERSION}-*.tar.gz
+	-[ -z "${NAME}" ] || rm -f ${NAME}-${VERSION}-*.tar.gz
 	-rm -f ${MANPAGES} *.[0-9].gz ${HTMLMANPAGES} pod2htm*.tmp
 
 # =====================

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141014/78535569/attachment.pgp>


More information about the AppArmor mailing list