forked from kubo/ruby-oci8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
92 lines (71 loc) · 2.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
VERSION = `$(RUBY) -I. -rlib/oci8/version.rb -e "print OCI8::VERSION"`
RUBY = ruby -w
all: build
config.save:
$(RUBY) setup.rb config
build: config.save
$(RUBY) setup.rb setup
check: build
$(RUBY) setup.rb test
clean:
$(RUBY) setup.rb clean
distclean:
$(RUBY) setup.rb distclean
install:
$(RUBY) setup.rb install
site-install:
$(RUBY) setup.rb install
format_c_source:
astyle --options=none --style=linux --indent=spaces=4 --brackets=linux --suffix=none ext/oci8/*.[ch]
# internal use only
.PHONY: dist dist-check doc copy-doc
doc:
rm -rf doc
TZ= yard
echo DirectoryIndex frames.html > doc/.htaccess
copy-doc: doc
rsync -avz doc/ rubyforge.org:/var/www/gforge-projects/ruby-oci8/en
dist:
-rm -rf ruby-oci8-$(VERSION)
mkdir ruby-oci8-$(VERSION)
tar cf - `cat dist-files` | (cd ruby-oci8-$(VERSION); tar xf - )
tar cfz ruby-oci8-$(VERSION).tar.gz ruby-oci8-$(VERSION)
dist-check: dist
cd ruby-oci8-$(VERSION) && $(MAKE) RUBY="$(RUBY)"
cd ruby-oci8-$(VERSION) && $(MAKE) RUBY="$(RUBY)" check
cd ruby-oci8-$(VERSION)/src && $(MAKE) RUBY="$(RUBY)" sitearchdir=../work sitelibdir=../work site-install
cd ruby-oci8-$(VERSION)/test && $(RUBY) -I../work -I../support test_all.rb
#
# for Windows
#
RUBY_18 = c:\ruby
RUBY_191 = c:\ruby-1.9.1
GEMPKG = ruby-oci8-2.0.3-x86-mswin32-60.gem
ext\oci8\oci8lib_18.so:
$(RUBY_18)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby18')"
md ruby18
cd ruby18
$(RUBY_18)\bin\ruby ..\setup.rb config -- --with-runtime-check
$(RUBY_18)\bin\ruby ..\setup.rb setup
rem $(RUBY_18)\bin\ruby ..\setup.rb test
cd ..
copy ruby18\ext\oci8\oci8lib_18.so ext\oci8\oci8lib_18.so
ext\oci8\oci8lib_191.so:
$(RUBY_191)\bin\ruby -r fileutils -e "FileUtils.rm_rf('ruby191')"
md ruby191
cd ruby191
$(RUBY_191)\bin\ruby ..\setup.rb config -- --with-runtime-check
$(RUBY_191)\bin\ruby ..\setup.rb setup
rem $(RUBY_191)\bin\ruby ..\setup.rb test
cd ..
copy ruby191\ext\oci8\oci8lib_191.so ext\oci8\oci8lib_191.so
copy ruby191\lib\oci8.rb lib\oci8.rb
$(GEMPKG): ext\oci8\oci8lib_18.so ext\oci8\oci8lib_191.so ruby-oci8.gemspec
$(RUBY_191)\bin\gem build ruby-oci8.gemspec -- current
test-win32-ruby18: $(GEMPKG)
$(RUBY_18)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
$(RUBY_18)\bin\ruby -rubygems test\test_all.rb
test-win32-ruby191: $(GEMPKG)
$(RUBY_191)\bin\gem install $(GEMPKG) --no-rdoc --no-ri --local
$(RUBY_191)\bin\ruby test\test_all.rb
test-win32: test-win32-ruby18 test-win32-ruby191