]> 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 a5e677fd4dc0248c25afd6725d26c27b502f69fb..7615865f916661e7121c7c6dc1db8d09bab4394f 100644 (file)
@@ -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 644 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"