File tree Expand file tree Collapse file tree 5 files changed +18
-31
lines changed
Expand file tree Collapse file tree 5 files changed +18
-31
lines changed Original file line number Diff line number Diff line change 4141* .so
4242* .so. *
4343* .dylib
44+ * .bundle
4445
4546# Executables
4647* .exe
@@ -64,3 +65,6 @@ modules.order
6465Module.symvers
6566Mkfile.old
6667dkms.conf
68+
69+ # Temporary files
70+ tmp /*
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ test_sources = $(wildcard test/*.c)
88test_objects = $(test_sources:.c=.o )
99non_main_objects = $(filter-out src/main.o, $(objects ) )
1010
11- soext ?= $(shell ruby -e 'puts RbConfig::CONFIG["SOEXT "]')
11+ soext ?= $(shell ruby -e 'puts RbConfig::CONFIG["DLEXT "]')
1212lib_name = lib$(exec ) .$(soext )
1313ruby_extension = ext/erbx/$(lib_name )
1414
@@ -47,4 +47,4 @@ test: $(test_objects) $(non_main_objects)
4747
4848clean :
4949 rm -f $(exec ) $(test_exec ) $(lib_name ) $(ruby_extension )
50- rm -f src/* .o test/* .o
50+ rm -rf src/* .o test/* .o lib/erbx/ * .bundle tmp
Original file line number Diff line number Diff line change @@ -17,23 +17,17 @@ Rake::TestTask.new(:test) do |t|
1717end
1818
1919Rake ::Task [ :compile ] . enhance do
20- IO . popen ( "make" ) do |output |
21- output . each_line do |line |
22- puts "#{ line } "
23- end
24- end
20+ puts "▏compile src/*"
2521
26- if $?. exitstatus != 0
27- raise "src/* could not be compiled #{ $?. exitstatus } "
28- end
29- end
22+ IO . popen ( "make" ) do |output |
23+ output . each_line do |line |
24+ puts "▏#{ line } "
25+ end
26+ end
3027
31- Rake ::Task [ :clean ] . enhance do
32- IO . popen ( "make clean" ) do |output |
33- output . each_line do |line |
34- puts "#{ line } "
35- end
36- end
37- end
28+ if $?. exitstatus != 0
29+ raise "src/* could not be compiled #{ $?. exitstatus } "
30+ end
31+ end
3832
39- task default : [ :compile , :test ]
33+ task default : [ :compile , :test ]
Original file line number Diff line number Diff line change 99 abort "#{ extension_name } .h can't be found"
1010end
1111
12- # expected_functions = [
13- # "erbx_lex",
14- # "erbx_lex_file",
15- # ]
16- #
17- # expected_functions.each do |expected_function|
18- # unless find_library(extension_name, expected_function)
19- # abort "lib#{extension_name}.so can't be found or #{expected_function}() not defined in it"
20- # end
21- # end
22-
2312create_header
2413create_makefile ( "#{ extension_name } /#{ extension_name } " )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module LibERBX
88 extend FFI ::Library
99
1010 def self . library_extension
11- RbConfig ::CONFIG [ "SOEXT " ]
11+ RbConfig ::CONFIG [ "DLEXT " ]
1212 end
1313
1414 def self . library_name
You can’t perform that action at this time.
0 commit comments