summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-03 13:21:26 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-03 13:27:39 +0000
commitb69177655547d60024cc3eb459d37a5dfc2e7cf3 (patch)
tree98276837e6c9f2be66821abc661fc0459fb31bcf
parentUpdating title comment in makefile. (diff)
downloadservice-tools-b69177655547d60024cc3eb459d37a5dfc2e7cf3.tar.xz
service-tools-b69177655547d60024cc3eb459d37a5dfc2e7cf3.zip
Making makefile more generic.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index d0aaf78..f77568c 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,8 @@
SHELL := sh -e
+SOFTWARE = apache-icons
+
all: build
build:
@@ -41,15 +43,15 @@ build:
done
install: build
- mkdir -p $(DESTDIR)/usr/share/apache-icons
- cp -a build/* $(DESTDIR)/usr/share/apache-icons
+ mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
+ cp -a build/* $(DESTDIR)/usr/share/$(SOFTWARE)
- for DIRECTORY in $(DESTDIR)/usr/share/apache-icons/*-png; \
+ for DIRECTORY in $(DESTDIR)/usr/share/$(SOFTWARE)/*-png; \
do \
cp -a share/common/*.png $${DIRECTORY}; \
done
- for DIRECTORY in $(DESTDIR)/usr/share/apache-icons/*-svg; \
+ for DIRECTORY in $(DESTDIR)/usr/share/$(SOFTWARE)/*-svg; \
do \
cp -a share/common/*.svg $${DIRECTORY}; \
done
@@ -61,7 +63,8 @@ install: build
cp -a share/apache/mods/* $(DESTDIR)/etc/apache2/mods-available
uninstall:
- rm -rf $(DESTDIR)/usr/share/apache-icons
+ rm -rf $(DESTDIR)/usr/share/$(SOFTWARE)/*
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/$(SOFTWARE) || true
clean:
rm -rf build