Skip to content

Commit

Permalink
Merge pull request git-lfs#3160 from jj1bdx/jj1bdx-fix-mancontent-gen
Browse files Browse the repository at this point in the history
Makefile: add explicit rule for commands/mancontent_gen.go
  • Loading branch information
ttaylorr authored Aug 1, 2018
2 parents 6c3e3a3 + da3965d commit e265385
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -176,12 +187,12 @@ 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
Expand Down

0 comments on commit e265385

Please sign in to comment.