Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
grumpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
grumpy
Commits
93543941
Commit
93543941
authored
Jan 19, 2017
by
Alexander F Rødseth
Committed by
Dylan Trotter
Jan 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for make install (#154)
parent
2dc8f1f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
Makefile
Makefile
+19
-2
No files found.
Makefile
View file @
93543941
...
...
@@ -32,12 +32,14 @@ ifeq ($(PYTHON),)
endif
PYTHON_BIN
:=
$(
shell
which
$(PYTHON)
)
PYTHON_VER
:=
$(
word
2,
$(
shell
$(PYTHON)
-V
2>&1
))
PY_DIR
:=
build/lib/python2.7/site-packages
ifeq
($(filter 2.7.%,$(PYTHON_VER)),)
$(error unsupported Python version $(PYTHON_VER), Grumpy only supports 2.7.x. To use a different python binary such as python2, run
:
'make PYTHON=python2 ...')
endif
PY_DIR
:=
build/lib/python2.7/site-packages
PY_INSTALL_DIR
:=
$(
shell
$(PYTHON)
-c
"from distutils.sysconfig import get_python_lib; print(get_python_lib(
))
"
)
export
GOPATH
:=
$(ROOT_DIR)
/build
export
PYTHONPATH
:=
$(ROOT_DIR)
/
$(PY_DIR)
export
PATH
:=
$(ROOT_DIR)
/build/bin:
$(PATH)
...
...
@@ -97,7 +99,7 @@ test: $(ACCEPT_PASS_FILES) $(ACCEPT_PY_PASS_FILES) $(COMPILER_PASS_FILES) $(COMP
precommit
:
cover gofmt lint test
.PHONY
:
all benchmarks clean cover gofmt golint lint precommit pylint run test
.PHONY
:
all benchmarks clean cover gofmt golint
install
lint precommit pylint run test
# ------------------------------------------------------------------------------
# grumpc compiler
...
...
@@ -244,3 +246,18 @@ $(patsubst %,build/%.go,$(BENCHMARKS)): build/%.go: %.py $(COMPILER)
$(BENCHMARK_BINS)
:
build/benchmarks/%_benchmark: build/benchmarks/%.go $(RUNTIME) $(STDLIB)
@
mkdir
-p
$
(
@D
)
@
go build
-o
$@
$<
# ------------------------------------------------------------------------------
# Installation
# ------------------------------------------------------------------------------
install
:
$(RUNNER_BIN) $(COMPILER) $(RUNTIME) $(STDLIB)
# Binary executables
install
-Dm755
build/bin/grumpc
"
$(DESTDIR)
/usr/bin/grumpc"
install
-Dm755
build/bin/grumprun
"
$(DESTDIR)
/usr/bin/grumprun"
# Python module
install
-d
"
$(DESTDIR)
"
{
/usr/lib/go,
"
$(PY_INSTALL_DIR)
"
}
cp
-rv
--no-preserve
=
ownership
"
$(PY_DIR)
/grumpy"
"
$(DESTDIR)$(PY_INSTALL_DIR)
"
# Go package and sources
cp
-rv
--no-preserve
=
ownership build/pkg build/src
"
$(DESTDIR)
/usr/lib/go/"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment