mirror of https://github.com/perkeep/perkeep.git
Change how the Android camput.arm asset is built to use make.go
Change-Id: I00a6e22ef088a173f78ffca83c984d915670180c
This commit is contained in:
parent
83ab8a62e8
commit
dabe4355af
|
@ -1,6 +1,16 @@
|
|||
# To use this Makefile, first:
|
||||
#
|
||||
# $ cd $GOROOT/src
|
||||
# $ GOOS=linux GOARCH=arm ./make.bash
|
||||
#
|
||||
# TODO: have make.go bootstrap that above when necessary, running "go env" to find the GOROOT and
|
||||
# mirror it all into a separate writable GOROOT under $CAMROOT/tmp and bootstrap
|
||||
# it with "GOOS=linux GOARCH=arm make.bash".
|
||||
all:
|
||||
GOROOT=$(HOME)/armgo GOOS=linux GOARCH=arm CGO_ENABLED=0 $(HOME)/armgo/bin/go build -o camput.arm --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`../../../misc/gitversion` camlistore.org/cmd/camput
|
||||
(cd ../../.. && go run make.go --os=linux --arch=arm --targets=camlistore.org/cmd/camput)
|
||||
cp -p ../../../bin/linux_arm/camput camput.arm
|
||||
../../../misc/gitversion > camput-version.txt
|
||||
mkdir -p ../gen/org/camlistore
|
||||
/bin/echo -n "package org.camlistore; public final class ChildProcessConfig { // " > ../gen/org/camlistore/ChildProcessConfig.java
|
||||
openssl sha1 camput.arm >> ../gen/org/camlistore/ChildProcessConfig.java
|
||||
/bin/echo "}" >> ../gen/org/camlistore/ChildProcessConfig.java
|
||||
|
|
11
make.go
11
make.go
|
@ -248,10 +248,21 @@ func main() {
|
|||
}
|
||||
|
||||
if !*quiet {
|
||||
// TODO: change this next line to call
|
||||
// actualBinDir(binDir) instead. But the linker
|
||||
// crashes (!!?!) right now if we do that.
|
||||
// Bug to be filed once I'm off this plane.
|
||||
log.Printf("Success. Binaries are in %s", binDir)
|
||||
}
|
||||
}
|
||||
|
||||
func actualBinDir(dir string) string {
|
||||
if *buildARCH == runtime.GOARCH && *buildOS == runtime.GOOS {
|
||||
return dir
|
||||
}
|
||||
return filepath.Join(dir, *buildOS+"_"+*buildARCH)
|
||||
}
|
||||
|
||||
// Create an environment variable of the form key=value.
|
||||
func envPair(key, value string) string {
|
||||
return fmt.Sprintf("%s=%s", key, value)
|
||||
|
|
Loading…
Reference in New Issue