Hello. This is a fix for problem in subject line. I believe this fix
to be correct and legitimate but as I don't know ruby well could
someone review it? If nobody knows ruby in depth I think we can commit
this even without deep review

-- 
Regards
Vladimir 'phcoder' Serbinenko
diff --git a/ChangeLog b/ChangeLog
index f3e631c..c7526d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-17  Vladimir Serbinenko  <phco...@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-06-16  James Jarvis  <james.jar...@ed.ac.uk>
 
 	* 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 "#...@name}: $(#{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 += #...@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]
@@ -393,4 +398,5 @@ while l = gets
   end
 
 end
+utils.each {|util| util.print_tail()}
 
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to