-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
38 lines (30 loc) · 947 Bytes
/
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
SOURCES = src/cirronlib.cpp src/apple_arm_events.h
PYTHON_DIR = python/cirron
RUBY_DIR = ruby/lib
.PHONY: test build build-python build-ruby copy-sources
test: test-python test-ruby
copy-sources:
cp $(SOURCES) $(PYTHON_DIR)/
cp $(SOURCES) $(RUBY_DIR)/
.PHONY: test-python
test-python: copy-sources
rm -f $(PYTHON_DIR)/cirronlib.so
@echo "Running Python tests..."
sudo PYTHONPATH=./python python -m unittest discover -s python/tests
.PHONY: test-ruby
test-ruby: copy-sources
rm -f $(RUBY_DIR)/cirronlib.so
@echo "Running Ruby tests..."
cd ruby && \
sudo gem install bundler && \
sudo bundle install && \
sudo bundle exec ruby -Ilib:test tests/tests.rb
build: build-python build-ruby
.PHONY: build-python
build-python: copy-sources
@echo "Building Python package..."
cd python && python setup.py sdist bdist_wheel
.PHONY: build-ruby
build-ruby: copy-sources
@echo "Building Ruby package..."
cd ruby && gem build cirron.gemspec