Skip to content

Commit cd0414f

Browse files
committed
build: work around a report of (install -d DIR) failing in one environment if DIR already exists.
1 parent 66ca472 commit cd0414f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

autoconf/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ install-dir.all = $(install-dir.bin) $(install-dir.include) \
8686
$(install-dir.lib) $(install-dir.man1) \
8787
$(install-dir.pkgconfig)
8888
$(install-dir.all):
89-
$(INSTALL) -d "$@"
89+
if [ ! -d "$@" ]; then $(INSTALL) -d "$@"; fi
90+
# ^^^^ on some platforms, install -d fails if the target already exists.
9091

9192

9293
#

main.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ install-dir.all = $(install-dir.bin) $(install-dir.include) \
435435
$(install-dir.lib) $(install-dir.man1) \
436436
$(install-dir.pkgconfig)
437437
$(install-dir.all):
438-
$(INSTALL) -d "$@"
438+
if [ ! -d "$@" ]; then $(INSTALL) -d "$@"; fi
439+
# ^^^^ on some platforms, install -d fails if the target already exists.
439440

440441
#
441442
# After jimsh is compiled, we run some sanity checks to ensure that

0 commit comments

Comments
 (0)