Skip to content

Commit 3747300

Browse files
authored
Avoid using mktemp -p (#60091)
It is not supported in macOS 13 userland which causes CI failures. For background info [see here](#59980 (comment)). This is a subset of PR #60080 but unlike that, it only solves the specific issue causing trouble in CI right now, and does not attempt to resolve a bunch of other things -- which may very well all be fine and nice and desirable, but it's quite a bit more to review.
1 parent 6fddac8 commit 3747300

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ clean:
568568
-rm -f $(BUILDDIR)/*.dbg.obj $(BUILDDIR)/*.o $(BUILDDIR)/*.dwo $(BUILDDIR)/*.$(SHLIB_EXT) $(BUILDDIR)/*.a $(BUILDDIR)/*.h.gen
569569
-rm -f $(BUILDDIR)/julia.expmap
570570
-rm -f $(BUILDDIR)/julia_version.h
571-
-rm -f $(BUILDDIR)/compile_commands.json
571+
-rm -f $(BUILDDIR)/compile_commands.json*
572572

573573
.PHONY: clean-flisp
574574
clean-flisp:
@@ -677,7 +677,7 @@ clean-analyzegc:
677677
# Compilation database generation using existing clang infrastructure
678678
.PHONY: regenerate-compile_commands
679679
regenerate-compile_commands:
680-
TMPFILE=$$(mktemp -p $(BUILDDIR) compile_commands.json.XXXXXX); \
680+
@TMPFILE=$$(mktemp $(abspath $(BUILDDIR)/compile_commands.json.XXXXXX)); \
681681
{ \
682682
CLANG_TOOLING_C_FLAGS="$$($(JULIAHOME)/contrib/escape_json.sh clang $(CLANG_TOOLING_C_FLAGS))"; \
683683
CLANG_TOOLING_CXX_FLAGS="$$($(JULIAHOME)/contrib/escape_json.sh clang $(CLANG_TOOLING_CXX_FLAGS))"; \

src/flisp/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ INCLUDED_FLISP_FILES := flisp.c:cvalues.c flisp.c:types.c flisp.c:print.c flisp.
142142
# Compilation database generation
143143
.PHONY: regenerate-compile_commands
144144
regenerate-compile_commands:
145-
TMPFILE=$$(mktemp -p $(BUILDDIR) compile_commands.json.XXXXXX); \
145+
TMPFILE=$$(mktemp $(abspath $(BUILDDIR)/compile_commands.json.XXXXXX)); \
146146
{ \
147147
CLANG_TOOLING_C_FLAGS="$$($(JULIAHOME)/contrib/escape_json.sh clang $(CLANG_TOOLING_C_FLAGS))"; \
148148
echo "["; \
@@ -176,7 +176,7 @@ clean:
176176
rm -f $(BUILDDIR)/*.a
177177
rm -f $(BUILDDIR)/$(EXENAME)$(EXE)
178178
rm -f $(BUILDDIR)/$(EXENAME)-debug$(EXE)
179-
rm -f $(BUILDDIR)/compile_commands.json
179+
rm -f $(BUILDDIR)/compile_commands.json*
180180
rm -f $(BUILDDIR)/host/*
181181

182182
.PHONY: flisp-deps compile-database

src/support/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ INCLUDED_SUPPORT_FILES := hashing.c:MurmurHash3.c
8080
# Compilation database generation
8181
.PHONY: regenerate-compile_commands
8282
regenerate-compile_commands:
83-
TMPFILE=$$(mktemp -p $(BUILDDIR) compile_commands.json.XXXXXX); \
83+
TMPFILE=$$(mktemp $(abspath $(BUILDDIR)/compile_commands.json.XXXXXX)); \
8484
{ \
8585
CLANG_TOOLING_S_FLAGS="$$($(JULIAHOME)/contrib/escape_json.sh clang $(JCPPFLAGS) $(DEBUGFLAGS))"; \
8686
CLANG_TOOLING_C_FLAGS="$$($(JULIAHOME)/contrib/escape_json.sh clang $(JCPPFLAGS) $(JCFLAGS) $(DEBUGFLAGS))"; \
@@ -123,7 +123,7 @@ clean:
123123
rm -f $(BUILDDIR)/core*
124124
rm -f $(BUILDDIR)/libsupport.a
125125
rm -f $(BUILDDIR)/libsupport-debug.a
126-
rm -f $(BUILDDIR)/compile_commands.json
126+
rm -f $(BUILDDIR)/compile_commands.json*
127127
rm -f $(BUILDDIR)/host/*
128128

129129
.PHONY: compile-database

0 commit comments

Comments
 (0)