From 401932c18f72db086a1a9890d34efb2e48a42e35 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 12 Aug 2025 18:19:09 +0900 Subject: [PATCH] NMake needs caret to escape a hash sign --- common.mk | 2 +- template/Makefile.in | 2 ++ win32/Makefile.sub | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index e2c3d72cc8..de90083c80 100644 --- a/common.mk +++ b/common.mk @@ -1539,7 +1539,7 @@ prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems) extract-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=outdate-bundled-gems) update-gems: $(HAVE_BASERUBY:yes=outdate-bundled-gems) -split_option = -F"\s+|\#.*" +split_option = -F"\s+|$(HASH_SIGN).*" update-gems$(sequential): PHONY $(ECHO) Downloading bundled gem files... diff --git a/template/Makefile.in b/template/Makefile.in index ea6ab349b0..66ac10de1b 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -289,6 +289,8 @@ ABI_VERSION_HDR = $(hdrdir)/ruby/internal/abi.h CAT_DEPEND = sed -e 's/{\$$([^(){}]*)[^{}]*}//g' -e /AUTOGENERATED/q +HASH_SIGN = \# + .SUFFIXES: .inc .h .c .y .i .$(ASMEXT) .$(DTRACE_EXT) all: diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 4dc63a99f2..664d54e5ff 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -464,6 +464,7 @@ ASMEXT = asm INSTALLED_LIST= .installed.list +HASH_SIGN = ^# SRC_FILE = $(<:\=/) OS_SRC_FILE = $(<:/=\) DEST_FILE = $(@:\=/)