]> arthur.barton.de Git - ax-unix.git/commitdiff
Makefile's: Only create non-existing directories
authorAlexander Barton <alex@barton.de>
Sat, 8 Jul 2017 21:32:24 +0000 (23:32 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 8 Jul 2017 21:32:32 +0000 (23:32 +0200)
This prevents the install(1) command to fiddle with owner, group and
permission information of already existing items (which could fail).

bup/save-user/Makefile
lib/ax/Makefile

index 6da3abb3075945a73f667e43ef4b1060cc6b7d9e..c442bd9d0e5062c4bc3c5c3bc4e806ca64d08bee 100644 (file)
@@ -13,7 +13,8 @@ ALL = bup-save-user
 include ../../Makefile.ax
 
 install-local: bup-save-user
-       install -d -o "$(USER)" -g "$(GROUP)" -m 755 \
-        "$(DESTDIR)$(PREFIX)/bin"
+       [ -d "$(DESTDIR)$(PREFIX)/bin" ] || \
+               install -d -o "$(USER)" -g "$(GROUP)" -m 755 \
+                "$(DESTDIR)$(PREFIX)/bin"
        install -p -o "$(USER)" -g "$(GROUP)" -m 755 bup-save-user \
         "$(DESTDIR)$(PREFIX)/bin/bup-save-user"
index c7e80354e7e3c43b24be790fd04aac2724d9a808..7615865f916661e7121c7c6dc1db8d09bab4394f 100644 (file)
@@ -13,8 +13,9 @@ 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"
+       [ -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 \