diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -22,7 +22,9 @@ SOFTWARE = apache-icons all: build -build: +build: share/man/*.txt + $(MAKE) -C share/man + for ICON in share/icons/*; \ do \ ICON="$$(basename $${ICON})"; \ @@ -62,11 +64,34 @@ install: build mkdir -p $(DESTDIR)/etc/apache2/mods-available cp -a share/apache/mods/* $(DESTDIR)/etc/apache2/mods-available + for SECTION in $$(seq 1 8); \ + do \ + if ls share/man/*.$${SECTION} > /dev/null 2>&1; \ + then \ + mkdir -p $(DESTDIR)/usr/share/man/man$${SECTION}; \ + cp share/man/*.$${SECTION} $(DESTDIR)/usr/share/man/man$${SECTION}; \ + fi; \ + done + uninstall: + for SECTION in $$(seq 1 8); \ + do \ + for FILE in share/man/*.$${SECTION}; \ + do \ + if [ -e "$${FILE}" ]; \ + then \ + rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${FILE}); \ + fi; \ + done; \ + rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/man/man$${SECTION} || true; \ + done + rm -rf $(DESTDIR)/usr/share/$(SOFTWARE)/* rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/$(SOFTWARE) || true clean: + $(MAKE) -C share/man clean + rm -rf build distclean: clean |