-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1.06 KB
/
Copy pathMakefile
File metadata and controls
41 lines (32 loc) · 1.06 KB
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
# Makefile for mruby-kernel-process
#
# Prerequisites:
# ../mruby # mruby checkout (sibling directory)
#
# Quick start:
# make # build toolchain and run tests
# make test # run tests
# make clean # clean build artifacts
MRUBY_DIR ?= ../mruby
BUILD_CONFIG = build.rb
BUILD_NAME = mruby-kernel-process
BUILD_DIR = $(MRUBY_DIR)/build/$(BUILD_NAME)
BUILD ?= test
TOOLCHAIN_BIN = bin/mruby bin/mrbc bin/mruby-config
TOOLCHAIN_STAMP = tmp/toolchain.$(BUILD).stamp
.PHONY: all test toolchain clean distclean
all: toolchain test
test: toolchain
ENV=TEST bin/mruby -r./spec/setup.rb spec/process_spec.rb
toolchain: $(TOOLCHAIN_STAMP)
$(TOOLCHAIN_STAMP): $(BUILD_CONFIG) mrbgem.rake $(shell find mrblib spec src -type f 2>/dev/null | sort)
mkdir -p tmp bin
ruby -C $(MRUBY_DIR) minirake clean 2>/dev/null || true
BUILD=$(BUILD) ruby -C $(MRUBY_DIR) minirake MRUBY_CONFIG=$$(pwd)/$(BUILD_CONFIG)
cp -r $(BUILD_DIR)/bin/* bin/
touch $(TOOLCHAIN_STAMP)
clean:
rm -f $(TOOLCHAIN_BIN)
rm -f tmp/toolchain.*.stamp
distclean: clean
rm -rf $(BUILD_DIR)