]> arthur.barton.de Git - ax-unix.git/blobdiff - lib/ax/Makefile
Makefile's: Only create non-existing directories
[ax-unix.git] / lib / ax / Makefile
index fcd675666bf2b9c6d3c36914ca82d01360616cbf..7615865f916661e7121c7c6dc1db8d09bab4394f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # ax-unix: Alex' UNIX Tools & Scripts
-# Copyright (c)2013-2015 Alexander Barton (alex@barton.de)
+# Copyright (c)2013-2016 Alexander Barton (alex@barton.de)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,9 +13,10 @@ ALL = README ax-common.sh
 include ../../Makefile.ax
 
 install-local: ax-common.sh
-       install -d -o $(USER) -g $(GROUP) -m 755 \
-        $(DESTDIR)$(PREFIX)/lib/ax
-       install -p -o $(USER) -g $(GROUP) -m 644 README \
-        $(DESTDIR)$(PREFIX)/lib/ax/README
-       install -p -o $(USER) -g $(GROUP) -m 755 ax-common.sh \
-        $(DESTDIR)$(PREFIX)/lib/ax/ax-common.sh
+       [ -d "$(DESTDIR)$(PREFIX)/lib/ax" ] || \
+               install -d -o "$(USER)" -g "$(GROUP)" -m 755 \
+                "$(DESTDIR)$(PREFIX)/lib/ax"
+       install -p -o "$(USER)" -g "$(GROUP)" -m 644 README \
+        "$(DESTDIR)$(PREFIX)/lib/ax/README"
+       install -p -o "$(USER)" -g "$(GROUP)" -m 644 ax-common.sh \
+        "$(DESTDIR)$(PREFIX)/lib/ax/ax-common.sh"