summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile27
1 files changed, 26 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f77568c..537f053 100644
--- a/Makefile
+++ b/Makefile
@@ -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