File 0124-otp-Create-TARGET-folders-in-Makefile.patch of Package erlang
From 4ab223e391c4003d776f6658289e2e754853f584 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 14 Oct 2022 13:53:52 +0200
Subject: [PATCH 4/9] otp: Create TARGET folders in Makefile
We create the TARGET folders in the makefiles instead
of in configure as then we can delete them without
having to re-run configure.
---
erts/configure | 17 -----------------
erts/configure.ac | 20 --------------------
erts/emulator/Makefile.in | 1 +
erts/etc/common/Makefile.in | 6 ++++++
make/configure | 11 -----------
5 files changed, 7 insertions(+), 48 deletions(-)
diff --git a/erts/configure b/erts/configure
index 7e2f4f01f8..f6a2ac1b49 100755
--- a/erts/configure
+++ b/erts/configure
@@ -25601,23 +25601,6 @@ printf "%s\n" "#define ERTS_EMU_CMDLINE_FLAGS \"$STATIC_CFLAGS $CFLAGS $DEBUG_CF
-erts=${erl_top}/erts
-
-erts_dirs="
- $erts/obj $erts/obj.debug
-
- $erts/obj/$host
- $erts/obj.debug/$host
-
-"
-for d in ${erl_top}/bin ${erl_top}/bin/$host $erts_dirs ;
-do
- if test ! -d $d; then
- mkdir -p 1>/dev/null 2>&1 $d
- fi
-done
-
-
diff --git a/erts/configure.ac b/erts/configure.ac
index eceb88f2ab..9ea98c25b0 100644
--- a/erts/configure.ac
+++ b/erts/configure.ac
@@ -3468,26 +3468,6 @@ AC_DEFINE_UNQUOTED(ERTS_EMU_CMDLINE_FLAGS,
AC_SUBST(STATIC_CFLAGS)
-dnl ----------------------------------------------------------------------
-dnl Directories needed for the build
-dnl ----------------------------------------------------------------------
-
-erts=${erl_top}/erts
-
-erts_dirs="
- $erts/obj $erts/obj.debug
-
- $erts/obj/$host
- $erts/obj.debug/$host
-
-"
-for d in ${erl_top}/bin ${erl_top}/bin/$host $erts_dirs ;
-do
- if test ! -d $d; then
- mkdir -p 1>/dev/null 2>&1 $d
- fi
-done
-
dnl ---------------------------------------------------------------------
dnl Autoheader macro for adding code at top and bottom of config.h.in
dnl ---------------------------------------------------------------------
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 30b2ff5c02..d6e6158077 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -432,6 +432,7 @@ CREATE_DIRS+=$(TTF_DIR)/asmjit $(TTF_DIR)/asmjit/core $(TTF_DIR)/asmjit/$(JIT_AR
endif
BINDIR = $(ERL_TOP)/bin/$(TARGET)
+CREATE_DIRS += $(BINDIR)
ERLANG_OSTYPE = @ERLANG_OSTYPE@
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
index 37f77d294b..2a569d3513 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
@@ -215,6 +215,12 @@ INSTALL_PROGS = \
$(INSTALL_EMBEDDED_PROGS)
endif
+CREATE_DIRS=$(OBJDIR) $(BINDIR)
+
+ifneq ($(strip $(CREATE_DIRS)),)
+_create_dirs := $(shell mkdir -p $(CREATE_DIRS))
+endif
+
.PHONY: etc
etc: $(ENTRY_OBJ) $(INSTALL_PROGS) $(EXTRA_LIBS) $(INSTALL_LIBS) $(TEXTFILES) $(INSTALL_TOP_BIN)
diff --git a/make/configure b/make/configure
index 169ae15fe6..8c048b9325 100755
--- a/make/configure
+++ b/make/configure
@@ -773,7 +773,6 @@ enable_option_checking
enable_bootstrap_only
enable_parallel_configure
enable_dirty_schedulers
-enable_plain_emulator
with_termcap
enable_kernel_poll
enable_sctp
@@ -1466,9 +1465,6 @@ Optional Features:
disable parallel execution of configure scripts
--enable-dirty-schedulers
enable dirty scheduler support
- --enable-plain-emulator enable threaded non-smp emulator
- --disable-plain-emulator
- disable threaded non-smp emulator
--enable-kernel-poll enable kernel poll support
--disable-kernel-poll disable kernel poll support
--enable-sctp enable sctp support (default) to on demand load the
@@ -5557,13 +5553,6 @@ then :
fi
-# Check whether --enable-plain-emulator was given.
-if test ${enable_plain_emulator+y}
-then :
- enableval=$enable_plain_emulator;
-fi
-
-
# Check whether --with-termcap was given.
if test ${with_termcap+y}
--
2.35.3