Skip to content

Commit

Permalink
Make rbconfig.rb loadable from exe/ruby
Browse files Browse the repository at this point in the history
So that it can run without `--disable=gems` option.
  • Loading branch information
nobu committed Dec 23, 2023
1 parent 8c03bda commit f6e9899
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.mk
Expand Up @@ -1045,6 +1045,7 @@ $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)
@$(NULLCMD) > $@

exe/$(PROGRAM): $(TIMESTAMPDIR)/$(arch)/.time
exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time $(PREP) {$(VPATH)}config.h
$(Q) $(CC) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(COUTFLAG)ruby-runner.$(OBJEXT) -c $(CSRCFLAG)$(srcdir)/ruby-runner.c
$(Q) $(PURIFY) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTFLAG)$@ ruby-runner.$(OBJEXT) $(LIBS)
Expand All @@ -1057,6 +1058,8 @@ exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time $(PREP) {$(VPATH)}config.h
-e ' File.symlink(prog, dest)' \
-e 'end' \
$(@F) $(@D) $(RUBY_INSTALL_NAME)$(EXEEXT)
$(Q) $(BOOTSTRAPRUBY) -r$(srcdir)/lib/fileutils \
-e 'FileUtils::Verbose.ln_sr(*ARGV, force: true)' rbconfig.rb $(EXTOUT)/$(arch)

exe/.time:
$(Q) $(MAKEDIRS) $(@D)
Expand Down

0 comments on commit f6e9899

Please sign in to comment.