mkrf 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/CHANGELOG +14 -1
  2. data/README +50 -22
  3. data/Rakefile +2 -1
  4. data/lib/mkrf.rb +1 -1
  5. data/lib/mkrf/availability.rb +60 -9
  6. data/lib/mkrf/generator.rb +32 -12
  7. data/lib/mkrf/rakehelper.rb +123 -0
  8. data/test/{sample_files/libtrivial/libtrivial.bundle → fixtures/some_binary} +0 -0
  9. data/test/integration/test_sample_projects.rb +1 -1
  10. data/test/sample_files/libtrivial/ext/extconf.rb +3 -0
  11. data/test/sample_files/libtrivial/{lib → ext}/libtrivial.c +0 -0
  12. data/test/unit/test_availability.rb +27 -2
  13. data/test/unit/test_generator.rb +55 -0
  14. metadata +144 -180
  15. data/test/mkrf.log +0 -1
  16. data/test/sample_files/libtrivial/Rakefile +0 -33
  17. data/test/sample_files/libtrivial/extconf.rb +0 -3
  18. data/test/sample_files/libtrivial/lib/libtrivial.o +0 -0
  19. data/test/sample_files/libtrivial/mkrf.log +0 -2
  20. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/Rakefile +0 -33
  21. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/cbg.o +0 -0
  22. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml.o +0 -0
  23. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/libxml_so.bundle +0 -0
  24. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/mkrf.log +0 -21
  25. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attr.o +0 -0
  26. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_attribute.o +0 -0
  27. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_document.o +0 -0
  28. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_dtd.o +0 -0
  29. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_input_cbg.o +0 -0
  30. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node.o +0 -0
  31. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_node_set.o +0 -0
  32. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_ns.o +0 -0
  33. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser.o +0 -0
  34. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_parser_context.o +0 -0
  35. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_sax_parser.o +0 -0
  36. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_schema.o +0 -0
  37. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_tree.o +0 -0
  38. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xinclude.o +0 -0
  39. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath.o +0 -0
  40. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpath_context.o +0 -0
  41. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer.o +0 -0
  42. data/test/sample_files/libxml-ruby-0.3.8/ext/xml/ruby_xml_xpointer_context.o +0 -0
  43. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/Rakefile +0 -33
  44. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/bytecode.o +0 -0
  45. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/emitter.o +0 -0
  46. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/gram.o +0 -0
  47. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/handler.o +0 -0
  48. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/implicit.o +0 -0
  49. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/mkrf.log +0 -3
  50. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/node.o +0 -0
  51. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/rubyext.o +0 -0
  52. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.bundle +0 -0
  53. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/syck.o +0 -0
  54. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/token.o +0 -0
  55. data/test/sample_files/syck-0.55/ext/ruby/ext/syck/yaml2byte.o +0 -0
data/test/mkrf.log DELETED
@@ -1 +0,0 @@
1
- # Logfile created on Mon Sep 04 16:10:06 PDT 2006 by logger.rb/1.5.2.7
@@ -1,33 +0,0 @@
1
- require 'rake/clean'
2
-
3
- CLEAN.include('*.o')
4
- CLOBBER.include('libtrivial.bundle', 'mkrf.log')
5
-
6
- SRC = FileList['*.c']
7
- OBJ = SRC.ext('o')
8
- CC = "gcc"
9
-
10
- ADDITIONAL_OBJECTS = ''
11
-
12
- LDSHARED = "cc -dynamic -bundle -undefined suppress -flat_namespace "
13
-
14
- LIBPATH = '-L"/usr/local/lib/ruby/1.8"'
15
-
16
- INCLUDES = "-I/usr/local/include -I/usr/local/lib/ruby/1.8/i686-darwin8.6.1 -I/usr/local/lib/ruby/site_ruby/1.8 -I."
17
-
18
- LIBS = "-lpthread -ldl -lobjc"
19
-
20
- CFLAGS = " "
21
-
22
- task :default => ['libtrivial.bundle']
23
-
24
- rule '.o' => '.c' do |t|
25
- sh "#{CC} #{CFLAGS} #{INCLUDES} -c -o #{t.name} #{t.source}"
26
- end
27
-
28
- desc "Build this extension"
29
- file 'libtrivial.bundle' => OBJ do
30
- sh "#{LDSHARED} #{LIBPATH} -o libtrivial.bundle #{OBJ} #{ADDITIONAL_OBJECTS} #{LIBS}"
31
- end
32
-
33
-
@@ -1,3 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../../lib/mkrf'
2
-
3
- Mkrf::Generator.new('libtrivial')
@@ -1,2 +0,0 @@
1
- # Logfile created on Wed Oct 04 18:07:33 PDT 2006 by logger.rb/1.5.2.7
2
- I, [2006-10-04T18:07:33.115099 #20208] INFO -- : Rakefile written
@@ -1,33 +0,0 @@
1
- require 'rake/clean'
2
-
3
- CLEAN.include('*.o')
4
- CLOBBER.include('libxml_so.bundle', 'mkrf.log')
5
-
6
- SRC = FileList['*.c']
7
- OBJ = SRC.ext('o')
8
- CC = "gcc"
9
-
10
- ADDITIONAL_OBJECTS = ''
11
-
12
- LDSHARED = "cc -dynamic -bundle -undefined suppress -flat_namespace "
13
-
14
- LIBPATH = '-L"/usr/local/lib/ruby/1.8"'
15
-
16
- INCLUDES = "-I/usr/local/include -I/usr/local/lib/ruby/1.8/i686-darwin8.6.1 -I/usr/local/lib/ruby/site_ruby/1.8 -I. -I/usr/local/include/libxml2"
17
-
18
- LIBS = "-lpthread -ldl -lobjc -lz -liconv -lxml2 -lxml2"
19
-
20
- CFLAGS = " -DHAVE_ZLIB_H -DHAVE_LIBXML_XMLVERSION_H"
21
-
22
- task :default => ['libxml_so.bundle']
23
-
24
- rule '.o' => '.c' do |t|
25
- sh "#{CC} #{CFLAGS} #{INCLUDES} -c -o #{t.name} #{t.source}"
26
- end
27
-
28
- desc "Build this extension"
29
- file 'libxml_so.bundle' => OBJ do
30
- sh "#{LDSHARED} #{LIBPATH} -o libxml_so.bundle #{OBJ} #{ADDITIONAL_OBJECTS} #{LIBS}"
31
- end
32
-
33
-
@@ -1,21 +0,0 @@
1
- # Logfile created on Wed Oct 04 18:07:24 PDT 2006 by logger.rb/1.5.2.7
2
- I, [2006-10-04T18:07:24.726052 #19953] INFO -- : Checking for library: socket
3
- W, [2006-10-04T18:07:24.899729 #19953] WARN -- : Function not found: socket()
4
- W, [2006-10-04T18:07:24.899924 #19953] WARN -- : Library not found: socket
5
- I, [2006-10-04T18:07:24.900035 #19953] INFO -- : Checking for library: nsl
6
- W, [2006-10-04T18:07:25.077383 #19953] WARN -- : Function not found: gethostbyname()
7
- W, [2006-10-04T18:07:25.077586 #19953] WARN -- : Library not found: nsl
8
- I, [2006-10-04T18:07:25.077742 #19953] INFO -- : Checking for library: z
9
- I, [2006-10-04T18:07:25.222610 #19953] INFO -- : Function found: inflate()
10
- I, [2006-10-04T18:07:25.222960 #19953] INFO -- : Library found: z
11
- I, [2006-10-04T18:07:25.223161 #19953] INFO -- : Checking for library: iconv
12
- I, [2006-10-04T18:07:25.356626 #19953] INFO -- : Function found: iconv_open()
13
- I, [2006-10-04T18:07:25.356894 #19953] INFO -- : Library found: iconv
14
- I, [2006-10-04T18:07:25.357068 #19953] INFO -- : Checking for library: xml2
15
- I, [2006-10-04T18:07:25.504460 #19953] INFO -- : Function found: xmlParseDoc()
16
- I, [2006-10-04T18:07:25.504701 #19953] INFO -- : Library found: xml2
17
- I, [2006-10-04T18:07:25.863306 #19953] INFO -- : Header found: libxml/xmlversion.h
18
- I, [2006-10-04T18:07:25.863622 #19953] INFO -- : Checking for library: xml2
19
- I, [2006-10-04T18:07:25.863692 #19953] INFO -- : Library already loaded: xml2
20
- I, [2006-10-04T18:07:26.006086 #19953] INFO -- : Function found: docbCreateFileParserCtxt()
21
- I, [2006-10-04T18:07:26.006870 #19953] INFO -- : Rakefile written
@@ -1,33 +0,0 @@
1
- require 'rake/clean'
2
-
3
- CLEAN.include('*.o')
4
- CLOBBER.include('syck.bundle', 'mkrf.log')
5
-
6
- SRC = FileList['*.c']
7
- OBJ = SRC.ext('o')
8
- CC = "gcc"
9
-
10
- ADDITIONAL_OBJECTS = ''
11
-
12
- LDSHARED = "cc -dynamic -bundle -undefined suppress -flat_namespace "
13
-
14
- LIBPATH = '-L"/usr/local/lib/ruby/1.8"'
15
-
16
- INCLUDES = "-I/usr/local/include -I/usr/local/lib/ruby/1.8/i686-darwin8.6.1 -I/usr/local/lib/ruby/site_ruby/1.8 -I."
17
-
18
- LIBS = "-lpthread -ldl -lobjc"
19
-
20
- CFLAGS = " -DHAVE_ST_H"
21
-
22
- task :default => ['syck.bundle']
23
-
24
- rule '.o' => '.c' do |t|
25
- sh "#{CC} #{CFLAGS} #{INCLUDES} -c -o #{t.name} #{t.source}"
26
- end
27
-
28
- desc "Build this extension"
29
- file 'syck.bundle' => OBJ do
30
- sh "#{LDSHARED} #{LIBPATH} -o syck.bundle #{OBJ} #{ADDITIONAL_OBJECTS} #{LIBS}"
31
- end
32
-
33
-
@@ -1,3 +0,0 @@
1
- # Logfile created on Wed Oct 04 18:07:30 PDT 2006 by logger.rb/1.5.2.7
2
- I, [2006-10-04T18:07:30.428737 #20126] INFO -- : Header found: st.h
3
- I, [2006-10-04T18:07:30.429626 #20126] INFO -- : Rakefile written