From a028a2ed10390a41babfaa49204a2360e8c2389f Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sat, 8 Jul 2017 23:32:24 +0200 Subject: [PATCH] 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). --- bup/save-user/Makefile | 5 +++-- lib/ax/Makefile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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 \ -- 2.39.2