TAGSRC = \ ../../ruby/include/ruby/*.h \ ../../ruby/*.c \ *.h \ types/*.h \ *.c \ types/*.c tags : TAGS TAGS : $(TAGSRC) etags $(TAGSRC) doc : yard doc *.c types/*.c C_TMPL = <%=Dir.glob("#{__dir__}/gen/tmpl*/*.c").join(" ")%> COGEN = <%= __dir__ %>/gen/cogen.rb DEPENDS = $(C_TMPL) <%= __dir__ %>/gen/*.rb <% type_c = [] type_rb = Dir.glob("#{__dir__}/gen/def/*.rb") type_rb.each do |s| type_c << c = "types/"+File.basename(s,".rb")+".c" %> <%=c%>: <%=s%> $(DEPENDS) $(MAKEDIRS) $(@D) types ruby $(COGEN) -l -o $@ <%=s%> <% end %> src : <%= type_c.join(" ") %> CLEANOBJS = *.o */*.o *.bak types/*.c