Fix libusb
* Makefile.in (LIBUSB): new macro
* genmk.rb (Utility/print_tail): new method
(Utility/rule): use intermediary variable #{prefix}_OBJECTS
(top level): call util.print_tail at the end.
+2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix libusb
+
+ * Makefile.in (LIBUSB): new macro
+ * genmk.rb (Utility/print_tail): new method
+ (Utility/rule): use intermediary variable #{prefix}_OBJECTS
+ (top level): call util.print_tail at the end.
+
2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
Make FreeBSD accept zpool.cache
AWK = @AWK@
LIBCURSES = @LIBCURSES@
LIBLZO = @LIBLZO@
+LIBUSB = @LIBUSB@
YACC = @YACC@
UNIFONT_BDF = @UNIFONT_BDF@
@dir = dir
@name = name
end
+ def print_tail()
+ prefix = @name.to_var
+ print "#{@name}: $(#{prefix}_DEPENDENCIES) $(#{prefix}_OBJECTS)
+ $(CC) -o $@ $(#{prefix}_OBJECTS) $(LDFLAGS) $(#{prefix}_LDFLAGS)
+
+"
+ end
attr_reader :dir, :name
def rule(sources)
"CLEANFILES += #{@name}$(EXEEXT) #{objs_str}
MOSTLYCLEANFILES += #{deps_str}
-
-#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
- $(CC) -o $@ #{objs_str} $(LDFLAGS) $(#{prefix}_LDFLAGS)
+#{prefix}_OBJECTS += #{objs_str}
" + objs.collect_with_index do |obj, i|
src = sources[i]
end
end
+utils.each {|util| util.print_tail()}