All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix building bug with --enable-grub-emu-usb
@ 2009-06-17 13:27 Vladimir 'phcoder' Serbinenko
  2009-06-19 15:46 ` Pavel Roskin
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-06-17 13:27 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

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

[-- Attachment #2: libusbfix.diff --]
[-- Type: text/x-diff, Size: 1580 bytes --]

diff --git a/ChangeLog b/ChangeLog
index f3e631c..c7526d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-06-17  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-06-16  James Jarvis  <James.Jarvis@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()}
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-16 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 13:27 [PATCH] fix building bug with --enable-grub-emu-usb Vladimir 'phcoder' Serbinenko
2009-06-19 15:46 ` Pavel Roskin
2009-06-19 16:03   ` Vladimir 'phcoder' Serbinenko
2009-06-21 11:38   ` Robert Millan
2009-06-21 12:34     ` Vladimir 'phcoder' Serbinenko
2009-07-16 15:38       ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.