From 2c9eb951ada555f789a4a59fcbf23af3371a0f4f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 25 Jan 2023 15:58:26 -1000 Subject: [PATCH] makefile: avoid using an intermediate file to get a newline in a variable --- makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index eb6651b1..53068cdf 100644 --- a/makefile +++ b/makefile @@ -2923,10 +2923,11 @@ else # end of primary make recipies OBJS = $(addsuffix .o,$(addprefix $(BLDDIR)/,$(basename $(notdir $(DEPS))))) $(shell $(MKDIR) $(call pathfix,$(BLDDIR))) ifeq (,$(findstring 3.,$(GNUMakeVERSION))) - $(file >$(call pathfix,$(BLDDIR)/NEWLINE.file),) - $(file >>$(call pathfix,$(BLDDIR)/NEWLINE.file),) - NEWLINE = $(file < $(call pathfix,$(BLDDIR)/NEWLINE.file)) - $(shell $(RM) $(call pathfix,$(BLDDIR)/NEWLINE.file)) + define BARLINE +| +| +endef + NEWLINE=$(subst |,,$(BARLINE)) MAKE_INFO = $(foreach VAR,CC OPTS DEPS LDFLAGS DIRS BUILD_SEPARATE,$(VAR)=$($(VAR))$(NEWLINE)) ifneq ($(MAKE_INFO),$(file <$(call pathfix,$(BLDDIR)/Make.info))$(NEWLINE)) # Different or no prior options, so start from scratch