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.
This commit is contained in:
parent
59ade63d27
commit
94414221cf
3 changed files with 19 additions and 3 deletions
|
@ -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>
|
2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Make FreeBSD accept zpool.cache
|
Make FreeBSD accept zpool.cache
|
||||||
|
|
|
@ -95,6 +95,7 @@ endif
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
LIBCURSES = @LIBCURSES@
|
LIBCURSES = @LIBCURSES@
|
||||||
LIBLZO = @LIBLZO@
|
LIBLZO = @LIBLZO@
|
||||||
|
LIBUSB = @LIBUSB@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
UNIFONT_BDF = @UNIFONT_BDF@
|
UNIFONT_BDF = @UNIFONT_BDF@
|
||||||
|
|
||||||
|
|
12
genmk.rb
12
genmk.rb
|
@ -220,6 +220,13 @@ class Utility
|
||||||
@dir = dir
|
@dir = dir
|
||||||
@name = name
|
@name = name
|
||||||
end
|
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
|
attr_reader :dir, :name
|
||||||
|
|
||||||
def rule(sources)
|
def rule(sources)
|
||||||
|
@ -234,9 +241,7 @@ class Utility
|
||||||
|
|
||||||
"CLEANFILES += #{@name}$(EXEEXT) #{objs_str}
|
"CLEANFILES += #{@name}$(EXEEXT) #{objs_str}
|
||||||
MOSTLYCLEANFILES += #{deps_str}
|
MOSTLYCLEANFILES += #{deps_str}
|
||||||
|
#{prefix}_OBJECTS += #{objs_str}
|
||||||
#{@name}: $(#{prefix}_DEPENDENCIES) #{objs_str}
|
|
||||||
$(CC) -o $@ #{objs_str} $(LDFLAGS) $(#{prefix}_LDFLAGS)
|
|
||||||
|
|
||||||
" + objs.collect_with_index do |obj, i|
|
" + objs.collect_with_index do |obj, i|
|
||||||
src = sources[i]
|
src = sources[i]
|
||||||
|
@ -395,4 +400,5 @@ while l = gets
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
utils.each {|util| util.print_tail()}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue