X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile;h=64ae0a560fa12057b8fd2acc73ed0642f5d11eb0;hb=refs%2Ftags%2Fupstream%2F2.5.1;hp=59555d4a54dd9f092f07dd45d89686ad880f8439;hpb=342dfef3098e19e566e53cadd9c5c75660bdb1fd;p=scm%2Ftest.git diff --git a/Makefile b/Makefile index 59555d4..64ae0a5 100644 --- a/Makefile +++ b/Makefile @@ -140,6 +140,17 @@ BUILD_TARGETS = bin/git-lfs-darwin-amd64 bin/git-lfs-darwin-386 \ bin/git-lfs-freebsd-amd64 bin/git-lfs-freebsd-386 \ bin/git-lfs-windows-amd64.exe bin/git-lfs-windows-386.exe +# mangen is a shorthand for ensuring that commands/mancontent_gen.go is kept +# up-to-date with the contents of docs/man/*.ronn. +.PHONY : mangen +mangen : commands/mancontent_gen.go + +# commands/mancontent_gen.go is generated by running 'go generate' on package +# 'commands' of Git LFS. It depends upon the contents of the 'docs' directory +# and converts those manpages into code. +commands/mancontent_gen.go : $(wildcard docs/man/*.ronn) + $(GO) generate github.com/git-lfs/git-lfs/commands + # Targets 'all' and 'build' build binaries of Git LFS for the above release # matrix. .PHONY : all build @@ -153,21 +164,21 @@ all build : $(BUILD_TARGETS) # # On Windows, they also depend on the resource.syso target, which installs and # embeds the versioninfo into the binary. -bin/git-lfs-darwin-amd64 : $(SOURCES) +bin/git-lfs-darwin-amd64 : $(SOURCES) mangen $(call BUILD,darwin,amd64,-darwin-amd64) -bin/git-lfs-darwin-386 : $(SOURCES) +bin/git-lfs-darwin-386 : $(SOURCES) mangen $(call BUILD,darwin,386,-darwin-386) -bin/git-lfs-linux-amd64 : $(SOURCES) +bin/git-lfs-linux-amd64 : $(SOURCES) mangen $(call BUILD,linux,amd64,-linux-amd64) -bin/git-lfs-linux-386 : $(SOURCES) +bin/git-lfs-linux-386 : $(SOURCES) mangen $(call BUILD,linux,386,-linux-386) -bin/git-lfs-freebsd-amd64 : $(SOURCES) +bin/git-lfs-freebsd-amd64 : $(SOURCES) mangen $(call BUILD,freebsd,amd64,-freebsd-amd64) -bin/git-lfs-freebsd-386 : $(SOURCES) +bin/git-lfs-freebsd-386 : $(SOURCES) mangen $(call BUILD,freebsd,386,-freebsd-386) -bin/git-lfs-windows-amd64.exe : resource.syso $(SOURCES) +bin/git-lfs-windows-amd64.exe : resource.syso $(SOURCES) mangen $(call BUILD,windows,amd64,-windows-amd64.exe) -bin/git-lfs-windows-386.exe : resource.syso $(SOURCES) +bin/git-lfs-windows-386.exe : resource.syso $(SOURCES) mangen $(call BUILD,windows,386,-windows-386.exe) # .DEFAULT_GOAL sets the operating system-appropriate Git LFS binary as the @@ -176,18 +187,24 @@ bin/git-lfs-windows-386.exe : resource.syso $(SOURCES) # bin/git-lfs targets the default output of Git LFS on non-Windows operating # systems, and respects the build knobs as above. -bin/git-lfs : $(SOURCES) fmt +bin/git-lfs : $(SOURCES) fmt mangen $(call BUILD,$(GOOS),$(GOARCH),) # bin/git-lfs.exe targets the default output of Git LFS on Windows systems, and # respects the build knobs as above. -bin/git-lfs.exe : $(SOURCES) resource.syso +bin/git-lfs.exe : $(SOURCES) resource.syso mangen $(call BUILD,$(GOOS),$(GOARCH),.exe) # resource.syso installs the 'goversioninfo' command and uses it in order to # generate a binary that has information included necessary to create the # Windows installer. -resource.syso: +# +# Generating a new resource.syso is a pure function of the contents in the +# prerequisites listed below. +resource.syso : \ +versioninfo.json script/windows-installer/git-lfs-logo.bmp \ +script/windows-installer/git-lfs-logo.ico \ +script/windows-installer/git-lfs-wizard-image.bmp @$(GO) get github.com/josephspurrier/goversioninfo/cmd/goversioninfo $(GO) generate @@ -305,7 +322,7 @@ vendor : glide.lock .PHONY : fmt ifeq ($(shell test -x "`which $(GOIMPORTS)`"; echo $$?),0) fmt : $(SOURCES) | lint - $(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?; + @$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?; else fmt : $(SOURCES) | lint @echo "git-lfs: skipping fmt, no goimports found at \`$(GOIMPORTS)\` ..." @@ -315,7 +332,7 @@ endif # are vendored in via vendor (see: above). .PHONY : lint lint : $(SOURCES) - $(GO) list -f '{{ join .Deps "\n" }}' . \ + @$(GO) list -f '{{ join .Deps "\n" }}' . \ | $(XARGS) $(GO) list -f '{{ if not .Standard }}{{ .ImportPath }}{{ end }}' \ | $(GREP) -v "github.com/git-lfs/git-lfs" || exit 0