diff --git a/ChangeLog b/ChangeLog index f3e631c..c7526d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-06-17 Vladimir Serbinenko + + 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-06-16 James Jarvis * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of diff --git a/Makefile.in b/Makefile.in index f82566a..cfbdfb8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,6 +95,7 @@ endif AWK = @AWK@ LIBCURSES = @LIBCURSES@ LIBLZO = @LIBLZO@ +LIBUSB = @LIBUSB@ YACC = @YACC@ UNIFONT_BDF = @UNIFONT_BDF@ diff --git a/genmk.rb b/genmk.rb index 36f4020..3356c3e 100644 --- a/genmk.rb +++ b/genmk.rb @@ -220,6 +220,13 @@ class Utility @dir = dir @name = name end + def print_tail() + prefix = @name.to_var + print "address@hidden: $(#{prefix}_DEPENDENCIES) $(#{prefix}_OBJECTS) + $(CC) -o $@ $(#{prefix}_OBJECTS) $(LDFLAGS) $(#{prefix}_LDFLAGS) + +" + end attr_reader :dir, :name def rule(sources) @@ -234,9 +241,7 @@ class Utility "CLEANFILES += address@hidden(EXEEXT) #{objs_str} MOSTLYCLEANFILES += #{deps_str} - address@hidden: $(#{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] @@ -393,4 +398,5 @@ while l = gets end end +utils.each {|util| util.print_tail()}