mirror of https://github.com/perkeep/perkeep.git
Merge branch 'master' of https://camlistore.googlesource.com/camlistore
This commit is contained in:
commit
22e7395f85
|
@ -134,16 +134,21 @@ func (c *serverCmd) build(name string) error {
|
|||
return fmt.Errorf("Could not build, invalid target: %v", name)
|
||||
}
|
||||
binPath := filepath.Join(c.camliSrcRoot, "bin", name)
|
||||
var modtime int64
|
||||
fi, err := os.Stat(binPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Could not stat %v: %v", binPath, err)
|
||||
if !os.IsNotExist(err) {
|
||||
return fmt.Errorf("Could not stat %v: %v", binPath, err)
|
||||
}
|
||||
} else {
|
||||
modtime = fi.ModTime().Unix()
|
||||
}
|
||||
args := []string{
|
||||
"run", "make.go",
|
||||
"--quiet",
|
||||
"--embed_static=false",
|
||||
"--sqlite=false",
|
||||
fmt.Sprintf("--if_mods_since=%d", fi.ModTime().Unix()),
|
||||
fmt.Sprintf("--if_mods_since=%d", modtime),
|
||||
"--targets=" + target,
|
||||
}
|
||||
cmd := exec.Command("go", args...)
|
||||
|
|
7
make.go
7
make.go
|
@ -53,9 +53,10 @@ var (
|
|||
verbose = flag.Bool("v", false, "Verbose mode")
|
||||
targets = flag.String("targets", "", "Optional comma-separated list of targets (i.e go packages) to build and install. Empty means all. Example: camlistore.org/server/camlistored,camlistore.org/cmd/camput")
|
||||
quiet = flag.Bool("quiet", false, "Don't print anything unless there's a failure.")
|
||||
ifModsSince = flag.Int64("if_mods_since", 0, "If non-zero return immediately without building if there aren't any filesystem modifications past this time (in unix seconds)")
|
||||
buildARCH = flag.String("arch", runtime.GOARCH, "Architecture to build for.")
|
||||
buildOS = flag.String("os", runtime.GOOS, "Operating system to build for.")
|
||||
// TODO(mpl): looks like ifModsSince is not used anywhere?
|
||||
ifModsSince = flag.Int64("if_mods_since", 0, "If non-zero return immediately without building if there aren't any filesystem modifications past this time (in unix seconds)")
|
||||
buildARCH = flag.String("arch", runtime.GOARCH, "Architecture to build for.")
|
||||
buildOS = flag.String("os", runtime.GOOS, "Operating system to build for.")
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue