From: Alexander Barton Date: Sat, 8 Jul 2017 21:32:24 +0000 (+0200) Subject: Makefile's: Only create non-existing directories X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-unix.git;a=commitdiff_plain;h=a028a2ed10390a41babfaa49204a2360e8c2389f;hp=79574a461a0c3693bb9f250fd85062d0459b9db6 Makefile's: Only create non-existing directories This prevents the install(1) command to fiddle with owner, group and permission information of already existing items (which could fail). --- diff --git a/bup/save-user/Makefile b/bup/save-user/Makefile index 6da3abb..c442bd9 100644 --- a/bup/save-user/Makefile +++ b/bup/save-user/Makefile @@ -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" diff --git a/lib/ax/Makefile b/lib/ax/Makefile index c7e8035..7615865 100644 --- a/lib/ax/Makefile +++ b/lib/ax/Makefile @@ -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 \