Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fzf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
fzf
Commits
7f774109
Commit
7f774109
authored
9 years ago
by
Junegunn Choi
Browse files
Options
Downloads
Patches
Plain Diff
make linux-static (#322)
parent
5a72dc69
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Dockerfile.ubuntu
+1
-1
1 addition, 1 deletion
src/Dockerfile.ubuntu
src/Makefile
+43
-20
43 additions, 20 deletions
src/Makefile
with
44 additions
and
21 deletions
src/Dockerfile.ubuntu
+
1
−
1
View file @
7f774109
...
...
@@ -3,7 +3,7 @@ MAINTAINER Junegunn Choi <junegunn.c@gmail.com>
# apt-get
RUN apt-get update && apt-get -y upgrade && \
apt-get install -y --force-yes git curl build-essential libncurses-dev
apt-get install -y --force-yes git curl build-essential libncurses-dev
libgpm-dev
# Install Go 1.4
RUN cd / && curl \
...
...
This diff is collapsed.
Click to expand it.
src/Makefile
+
43
−
20
View file @
7f774109
...
...
@@ -5,8 +5,19 @@ endif
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),Darwin)
GOOS
:=
darwin
LDFLAGS
:=
ifdef
STATIC
$(
error
Static linking not possible on OS X
)
endif
else
ifeq
($(UNAME_S),Linux)
GOOS
:=
linux
ifdef
STATIC
SUFFIX
:=
-static
LDFLAGS
:=
--ldflags
'-extldflags "-static -ltinfo -lgpm"'
else
SUFFIX
:=
LDFLAGS
:=
endif
endif
ifneq
($(shell uname -m),x86_64)
...
...
@@ -16,21 +27,24 @@ endif
SOURCES
:=
$(
wildcard
*
.go
*
/
*
.go
)
BINDIR
:=
../bin
BINARY32
:=
fzf-
$(
GOOS
)
_386
BINARY64
:=
fzf-
$(
GOOS
)
_amd64
BINARY32
:=
fzf-
$(
GOOS
)
_386
$(
SUFFIX
)
BINARY64
:=
fzf-
$(
GOOS
)
_amd64
$(
SUFFIX
)
VERSION
=
$(
shell fzf/
$(
BINARY64
)
--version
)
RELEASE32
=
fzf-
$(
VERSION
)
-
$(
GOOS
)
_386
RELEASE64
=
fzf-
$(
VERSION
)
-
$(
GOOS
)
_amd64
RELEASE32
=
fzf-
$(
VERSION
)
-
$(
GOOS
)
_386
$(
SUFFIX
)
RELEASE64
=
fzf-
$(
VERSION
)
-
$(
GOOS
)
_amd64
$(
SUFFIX
)
all
:
release
release
:
build
cd
fzf
&&
\
cp
$(
BINARY32
)
$(
RELEASE32
)
&&
tar
-czf
$(
RELEASE32
)
.tgz
$(
RELEASE32
)
&&
\
cp
$(
BINARY64
)
$(
RELEASE64
)
&&
tar
-czf
$(
RELEASE64
)
.tgz
$(
RELEASE64
)
&&
\
rm
$(
RELEASE32
)
$(
RELEASE64
)
-
cd
fzf
&&
cp
$(
BINARY32
)
$(
RELEASE32
)
&&
tar
-czf
$(
RELEASE32
)
.tgz
$(
RELEASE32
)
cd
fzf
&&
cp
$(
BINARY64
)
$(
RELEASE64
)
&&
tar
-czf
$(
RELEASE64
)
.tgz
$(
RELEASE64
)
&&
\
rm
-f
$(
RELEASE32
)
$(
RELEASE64
)
ifndef
STATIC
build
:
test fzf/$(BINARY32) fzf/$(BINARY64)
else
build
:
test fzf/$(BINARY64)
endif
test
:
go get
...
...
@@ -42,13 +56,13 @@ uninstall:
rm
-f
$(
BINDIR
)
/fzf
$(
BINDIR
)
/
$(
BINARY64
)
clean
:
cd
fzf
&&
rm
-f
$(
BINARY32
)
$(
BINARY64
)
$(
RELEASE32
)
.tgz
$(
RELEASE64
)
.tgz
cd
fzf
&&
rm
-f
fzf-
*
fzf/$(BINARY32)
:
$(SOURCES)
cd
fzf
&&
GOARCH
=
386
CGO_ENABLED
=
1 go build
-o
$(
BINARY32
)
fzf/$(BINARY64)
:
$(SOURCES)
cd
fzf
&&
go build
-o
$(
BINARY64
)
cd
fzf
&&
go build
$(
LDFLAGS
)
-o
$(
BINARY64
)
$(BINDIR)/fzf
:
fzf/$(BINARY64) | $(BINDIR)
cp
-f
fzf/
$(
BINARY64
)
$(
BINDIR
)
...
...
@@ -57,18 +71,27 @@ $(BINDIR)/fzf: fzf/$(BINARY64) | $(BINDIR)
$(BINDIR)
:
mkdir
-p
$@
# Linux distribution to build fzf on
DISTRO
:=
arch
docker-arch
:
docker build
-t
junegunn/arch-sandbox - < Dockerfile.
arch
docker
:
docker build
-t
junegunn/
$(
DISTRO
)
-sandbox
- < Dockerfile.
$(
DISTRO
)
docker
-ubuntu
:
docker build
-t
junegunn/
arch
-sandbox - < Dockerfile.
ubuntu
linux
:
docker
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/
$
(
DISTRO
)
-sandbox
\
/bin/ba
sh
-c
i
'cd /go/src/github.com/junegunn/fzf/src;
make
'
arch
:
docker
-arch
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/
$
@
-sandbox
\
sh
-c
'cd /go/src/github.com/junegunn/fzf/src;
/bin/bash
'
$(DISTRO)
:
docker
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/
$
(
DISTRO
)
-sandbox
\
ubuntu
:
docker
-ubuntu
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/
$
@
-sandbox
\
sh
-c
'cd /go/src/github.com/junegunn/fzf/src; /bin/bash'
.PHONY
:
all build release test install uninstall clean docker linux $(DISTRO)
linux
:
docker-arch
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/arch-sandbox
\
/bin/bash
-ci
'cd /go/src/github.com/junegunn/fzf/src; make'
linux-static
:
docker-ubuntu
docker run
-i
-t
-v
$(
GOPATH
)
:/go junegunn/ubuntu-sandbox
\
/bin/bash
-ci
'cd /go/src/github.com/junegunn/fzf/src; make STATIC=1'
.PHONY
:
all build release test install uninstall clean docker
\
linux linux-static arch ubuntu docker-arch docker-ubuntu
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment