Skip to content

Commit 484b1b3

Browse files
committed
Split RBCONFIG recipe
And make `ifchange` a pipeline; it works even on Windows now.
1 parent cf060ad commit 484b1b3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

common.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,20 +937,24 @@ extconf: $(PREP)
937937
rbconfig.rb: $(RBCONFIG)
938938

939939
$(HAVE_BASERUBY:no=)$(RBCONFIG)$(HAVE_BASERUBY:no=): $(PREP)
940-
$(RBCONFIG): $(tooldir)/mkconfig.rb config.status $(srcdir)/version.h $(srcdir)/common.mk
940+
$(RBCONFIG): $(tooldir)/mkconfig.rb $(srcdir)/version.h $(srcdir)/common.mk
941+
$(RBCONFIG): unicode-version update-rbconfig
942+
943+
unicode-version:
941944
$(Q)$(BOOTSTRAPRUBY) -n \
942945
-e 'BEGIN{version=ARGV.shift;mis=ARGV.dup}' \
943946
-e 'END{abort "UNICODE version mismatch: #{mis}" unless mis.empty?}' \
944947
-e '(mis.delete(ARGF.path); ARGF.close) if /ONIG_UNICODE_VERSION_STRING +"#{Regexp.quote(version)}"/o' \
945948
$(UNICODE_VERSION) $(UNICODE_DATA_HEADERS)
949+
950+
update-rbconfig: config.status
946951
$(Q)$(BOOTSTRAPRUBY) $(tooldir)/mkconfig.rb \
947952
-arch=$(arch) -version=$(RUBY_PROGRAM_VERSION) \
948953
-install_name=$(RUBY_INSTALL_NAME) \
949954
-so_name=$(RUBY_SO_NAME) \
950955
-unicode_version=$(UNICODE_VERSION) \
951956
-unicode_emoji_version=$(UNICODE_EMOJI_VERSION) \
952-
> rbconfig.tmp
953-
$(IFCHANGE) "--timestamp=$@" rbconfig.rb rbconfig.tmp
957+
| $(IFCHANGE) "--timestamp=$@" rbconfig.rb -
954958

955959
test-rubyspec: test-spec
956960
yes-test-rubyspec: yes-test-spec

0 commit comments

Comments
 (0)