Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 23eb233

Browse files
author
Erik Hollensbe
committed
Move from vendor to mruby-build directory, point everything at it
go 1.13+ needs this adjustment to compile appropriately with the other tools we use. `vendor` is special in a modules-only environment. Signed-off-by: Erik Hollensbe <[email protected]>
1 parent cd6a04a commit 23eb233

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
build_config.rb
22
libmruby.a
3-
vendor/
3+
mruby-build

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
MRUBY_COMMIT ?= 1.2.0
2+
MRUBY_VENDOR_DIR ?= mruby-build
23

34
all: libmruby.a test
45

56
clean:
6-
rm -rf vendor
7+
rm -rf ${MRUBY_VENDOR_DIR}
78
rm -f libmruby.a
89

910
gofmt:
@@ -17,15 +18,15 @@ megacheck:
1718
go get honnef.co/go/tools/cmd/megacheck
1819
GO111MODULE=off megacheck ./...
1920

20-
libmruby.a: vendor/mruby
21-
cd vendor/mruby && ${MAKE}
22-
cp vendor/mruby/build/host/lib/libmruby.a .
21+
libmruby.a: ${MRUBY_VENDOR_DIR}/mruby
22+
cd ${MRUBY_VENDOR_DIR}/mruby && ${MAKE}
23+
cp ${MRUBY_VENDOR_DIR}/mruby/build/host/lib/libmruby.a .
2324

24-
vendor/mruby:
25-
mkdir -p vendor
26-
git clone https://github.com/mruby/mruby.git vendor/mruby
27-
cd vendor/mruby && git reset --hard && git clean -fdx
28-
cd vendor/mruby && git checkout ${MRUBY_COMMIT}
25+
${MRUBY_VENDOR_DIR}/mruby:
26+
mkdir -p ${MRUBY_VENDOR_DIR}
27+
git clone https://github.com/mruby/mruby.git ${MRUBY_VENDOR_DIR}/mruby
28+
cd ${MRUBY_VENDOR_DIR}/mruby && git reset --hard && git clean -fdx
29+
cd ${MRUBY_VENDOR_DIR}/mruby && git checkout ${MRUBY_COMMIT}
2930

3031
test: gofmt lint
3132
go test -v

golint.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

mruby.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mruby
22

33
import "unsafe"
44

5-
// #cgo CFLAGS: -Ivendor/mruby/include
5+
// #cgo CFLAGS: -Imruby-build/mruby/include
66
// #cgo LDFLAGS: ${SRCDIR}/libmruby.a -lm
77
// #include <stdlib.h>
88
// #include "gomruby.h"

0 commit comments

Comments
 (0)