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

34 lines
796 B
Text
Raw Normal View History

! encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS
! encs.each {|e| e.chomp!(".c")}
! encs = encs.sort_by {|e| e.split(/(\d+)/).map {|n| Integer(n) rescue n}}
VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"]) %>
ENCOBJS = <%encs.map {|e|"#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%"\n" if encs.size>1%>
ENCSOS = <%encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%>
all: $(ENCSOS)
.c.$(OBJEXT):
<%COMPILE_C%>
! unless encs.empty?
$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
! end
! encs.each do |e|
$(ENCSODIR)/<%e%>.$(DLEXT): <%e%>.$(OBJEXT)
<%LINK_SO.gsub(/\n/, "\n\t")%>
! end
! encs.each do |e|
<%e%>.$(OBJEXT): <%e%>.c
! end
clean:
$(RM) $(ENCSOS)
$(RM) $(ENCOBJS)
distclean: clean
$(RM) enc.mk