1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

defs/gmake.mk: make universal mjit_min_header link

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-07 13:45:14 +00:00
parent a8c03c45c4
commit ec993c1efb
2 changed files with 12 additions and 8 deletions

View file

@ -192,6 +192,15 @@ COMPILE_PRELUDE = $(srcdir)/tool/generic_erb.rb $(srcdir)/template/prelude.c.tmp
SHOWFLAGS = showflags
MAKE_LINK = $(MINIRUBY) -rfileutils -e "include FileUtils::Verbose" \
-e "src, dest = ARGV" \
-e "exit if File.identical?(src, dest) or cmp(src, dest) rescue nil" \
-e "def noraise; yield; rescue; rescue NotImplementedError; end" \
-e "noraise {ln_sf('../'*dest.count('/')+src, dest)} or" \
-e "noraise {ln(src, dest)} or" \
-e "cp(src, dest)"
all: $(SHOWFLAGS) main docs
main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs $(MJIT_MIN_HEADER)
@ -210,14 +219,7 @@ $(MJIT_MIN_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(MJIT_HEADER:.h=)$(MJIT_HEADER_S
$(ECHO) building $@
$(MINIRUBY) $(srcdir)/tool/transform_mjit_header.rb "$(CC) $(ARCH_FLAG)" $(MJIT_HEADER:.h=)$(MJIT_HEADER_ARCH).h $@
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
$(Q) $(MINIRUBY) -rfileutils -e "include FileUtils::Verbose" \
-e "src, dest = ARGV" \
-e "exit if File.identical?(src, dest) or cmp(src, dest) rescue nil" \
-e "def noraise; yield; rescue; rescue NotImplementedError; end" \
-e "noraise {ln_sf('../'*dest.count('/')+src, dest)} or" \
-e "noraise {ln(src, dest)} or" \
-e "cp(src, dest)" \
$@ $(MJIT_HEADER_INSTALL_DIR)/$(@F)
$(Q) $(MAKE_LINK) $@ $(MJIT_HEADER_INSTALL_DIR)/$(@F)
.PHONY: showflags
exts enc trans: $(SHOWFLAGS)

View file

@ -162,5 +162,7 @@ $(MJIT_MIN_HEADER): $(mjit_min_headers)
done
$(RM) $@.tmp
$(IFCHANGE) $@ $@.new
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
$(Q) $(MAKE_LINK) $@ $(MJIT_HEADER_INSTALL_DIR)/$(@F)
endif