mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* cygwin/GNUmakefile.in (scriptbin): make executable file from
scripts with stub. * ruby.c (load_file_internal): assume xflag for exe file as well as no-shebang file. * tool/rbinstall.rb: install script programs. * win32/mkexports.rb (Exports#initialize): alias ruby_sysinit for stub. * win32/stub.c: stub for scripts. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5ddcc93a3f
commit
536e266e58
7 changed files with 85 additions and 6 deletions
|
@ -31,9 +31,16 @@ SOLIBS := $(DLL_BASE_NAME).res.@OBJEXT@ $(SOLIBS)
|
|||
EXTOBJS += $(if $(filter-out $(RUBYW_INSTALL_NAME),$(@:$(EXEEXT)=)),$(RUBY_INSTALL_NAME),$(@:$(EXEEXT)=)).res.$(OBJEXT)
|
||||
RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(DLL_BASE_NAME).rc
|
||||
RUBYDEF = $(DLL_BASE_NAME).def
|
||||
STUBPROGRAM = rubystub$(EXEEXT)
|
||||
SCRIPTPROGRAMS = $(addsuffix $(EXEEXT),$(notdir $(wildcard $(srcdir)/bin/*)))
|
||||
|
||||
ruby: $(PROGRAM)
|
||||
rubyw: $(WPROGRAM)
|
||||
stub: $(STUBPROGRAM)
|
||||
scriptbin: $(SCRIPTPROGRAMS)
|
||||
|
||||
%$(EXEEXT): bin/% $(STUBPROGRAM)
|
||||
{ cat $(STUBPROGRAM); echo; sed -e '1{' -e '/^#!.*ruby/!i\' -e '#!/bin/ruby' -e '}' $<; } > $@
|
||||
|
||||
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
|
||||
$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
|
||||
|
@ -52,6 +59,10 @@ $(WPROGRAM): $(RUBYW_INSTALL_NAME).res.@OBJEXT@
|
|||
@rm -f $@
|
||||
$(PURIFY) $(CC) -mwindows -e _mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
|
||||
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
|
||||
$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.@OBJEXT@ stub.@OBJEXT@
|
||||
@rm -f $@
|
||||
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) \
|
||||
stub.@OBJEXT@ $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
|
||||
|
||||
$(RUBY_EXP): $(LIBRUBY_A)
|
||||
$(DLLWRAP) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue