]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Thu, 16 Jul 2009 14:53:33 +0000 (14:53 +0000)
committerphcoder <phcoder@localhost>
Thu, 16 Jul 2009 14:53:33 +0000 (14:53 +0000)
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.

ChangeLog
Makefile.in
genmk.rb

index 80bd3a68a2d000ea550569a87dea127881f6b614..d6c793ff521960baf88789a614727b984a51a665 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index 3d208e7771bc0b3ff5c90fc82efd1f311e4df883..436db63caae1fc96bce896827f62d7f242ae4bb2 100644 (file)
@@ -95,6 +95,7 @@ endif
 AWK = @AWK@
 LIBCURSES = @LIBCURSES@
 LIBLZO = @LIBLZO@
+LIBUSB = @LIBUSB@
 YACC = @YACC@
 UNIFONT_BDF = @UNIFONT_BDF@
 
index e3866c1505b8b025803ef8085635c32c9e4523b7..9574ce98dbf278e55993d054d7cc67bcc088742c 100644 (file)
--- 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]
@@ -395,4 +400,5 @@ while l = gets
   end
 
 end
+utils.each {|util| util.print_tail()}