From cd0414f619fb84afd64de738029bf3442dbbbf0d Mon Sep 17 00:00:00 2001 From: Stephan Beal Date: Fri, 7 Feb 2025 19:18:20 +0000 Subject: [PATCH] build: work around a report of (install -d DIR) failing in one environment if DIR already exists. --- autoconf/Makefile.in | 3 ++- main.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autoconf/Makefile.in b/autoconf/Makefile.in index 0270b9a1db..b41c03e76c 100644 --- a/autoconf/Makefile.in +++ b/autoconf/Makefile.in @@ -86,7 +86,8 @@ install-dir.all = $(install-dir.bin) $(install-dir.include) \ $(install-dir.lib) $(install-dir.man1) \ $(install-dir.pkgconfig) $(install-dir.all): - $(INSTALL) -d "$@" + if [ ! -d "$@" ]; then $(INSTALL) -d "$@"; fi +# ^^^^ on some platforms, install -d fails if the target already exists. # diff --git a/main.mk b/main.mk index 38d1ba5f56..27b8848879 100644 --- a/main.mk +++ b/main.mk @@ -435,7 +435,8 @@ install-dir.all = $(install-dir.bin) $(install-dir.include) \ $(install-dir.lib) $(install-dir.man1) \ $(install-dir.pkgconfig) $(install-dir.all): - $(INSTALL) -d "$@" + if [ ! -d "$@" ]; then $(INSTALL) -d "$@"; fi +# ^^^^ on some platforms, install -d fails if the target already exists. # # After jimsh is compiled, we run some sanity checks to ensure that -- 2.11.4.GIT