Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0b8b7100
Commit
0b8b7100
authored
Apr 30, 2018
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify build for bindata
parent
6387c43e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
71 deletions
+39
-71
Makefile.generated_files
build/root/Makefile.generated_files
+39
-71
No files found.
build/root/Makefile.generated_files
View file @
0b8b7100
...
@@ -35,10 +35,7 @@ SHELL := /bin/bash
...
@@ -35,10 +35,7 @@ SHELL := /bin/bash
# This rule collects all the generated file sets into a single rule. Other
# This rule collects all the generated file sets into a single rule. Other
# rules should depend on this to ensure generated files are rebuilt.
# rules should depend on this to ensure generated files are rebuilt.
.PHONY
:
generated_files
.PHONY
:
generated_files
generated_files
:
gen_deepcopy gen_defaulter gen_conversion gen_openapi
generated_files
:
gen_deepcopy gen_defaulter gen_conversion gen_openapi gen_bindata
##TH##FIXME gen_bindata
#
#
# Helper logic to calculate Go's dependency DAG ourselves.
# Helper logic to calculate Go's dependency DAG ourselves.
...
@@ -67,17 +64,18 @@ $(META_DIR)/$(GO_PKGDEPS_FILE): FORCE
...
@@ -67,17 +64,18 @@ $(META_DIR)/$(GO_PKGDEPS_FILE): FORCE
echo
"DBG: calculating Go dependencies"
;
\
echo
"DBG: calculating Go dependencies"
;
\
fi
fi
hack/run-in-gopath.sh go
install
./hack/make-rules/helpers/go2make
hack/run-in-gopath.sh go
install
./hack/make-rules/helpers/go2make
hack/run-in-gopath.sh go2make
\
hack/run-in-gopath.sh go2make
\
k8s.io/kubernetes/...
\
k8s.io/kubernetes/...
\
--prune
k8s.io/kubernetes/staging
\
--prune
k8s.io/kubernetes/staging
\
--prune
k8s.io/kubernetes/vendor
\
--prune
k8s.io/kubernetes/vendor
\
k8s.io/kubernetes/vendor/k8s.io/...
\
k8s.io/kubernetes/vendor/k8s.io/...
\
github.com/jteeuwen/go-bindata/go-bindata/...
\
>
$@
.tmp
>
$@
.tmp
if
!
cmp
-s
$@
.tmp
$@
;
then
\
if
!
cmp
-s
$@
.tmp
$@
;
then
\
if
[[
"
$(DBG_CODEGEN)
"
==
1
]]
;
then
\
if
[[
"
$(DBG_CODEGEN)
"
==
1
]]
;
then
\
echo
"DBG:
$(GO_PKGDEPS_FILE)
changed"
;
\
echo
"DBG:
$(GO_PKGDEPS_FILE)
changed"
;
\
fi
;
\
fi
;
\
cat
$@
.tmp
>
$@
;
\
cat
$@
.tmp
>
$@
;
\
fi
fi
rm
-f
$@
.tmp
rm
-f
$@
.tmp
...
@@ -459,60 +457,30 @@ $(OPENAPI_GEN): $(k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd/openapi-gen
...
@@ -459,60 +457,30 @@ $(OPENAPI_GEN): $(k8s.io/kubernetes/vendor/k8s.io/code-generator/cmd/openapi-gen
touch
$@
touch
$@
##TH### bindata generation
# bindata generation
##TH###
#
##TH##
##TH### The tool used to generate bindata files.
# The tool used to generate bindata files.
##TH##BINDATA_GEN := $(BIN_DIR)/go-bindata
BINDATA_GEN
:=
$(BIN_DIR)
/go-bindata
##TH##
##TH### A wrapper script that generates all bindata files. It is fast enough that we
# A wrapper script that generates all bindata files. It is fast enough that we
##TH### don't care.
# don't care.
##TH##BINDATA_SCRIPT := hack/generate-bindata.sh
BINDATA_SCRIPT
:=
hack/generate-bindata.sh
##TH##
##TH### This rule is the user-friendly entrypoint for bindata generation.
# This rule is the user-friendly entrypoint for bindata generation.
##TH##.PHONY: gen_bindata
.PHONY
:
gen_bindata
##TH##gen_bindata: $(BINDATA_GEN) FORCE
gen_bindata
:
$(BINDATA_GEN) FORCE
##TH## ./hack/run-in-gopath.sh $(BINDATA_SCRIPT)
./hack/run-in-gopath.sh
$(BINDATA_SCRIPT)
##TH##
##TH### This calculates the dependencies for the generator tool, so we only rebuild
# How to build the generator tool. The deps for this are defined in
##TH### it when needed. It is PHONY so that it always runs, but it only updates the
# the $(BINDATA_GEN).mk, above.
##TH### file if the contents have actually changed. We 'sinclude' this later.
#
##TH##.PHONY: $(META_DIR)/$(BINDATA_GEN).mk
# A word on the need to touch: This rule might trigger if, for example, a
##TH##$(META_DIR)/$(BINDATA_GEN).mk:
# non-Go file was added or deleted from a directory on which this depends.
##TH## mkdir -p $(@D); \
# This target needs to be reconsidered, but Go realizes it doesn't actually
##TH## (echo -n "$(BINDATA_GEN): "; \
# have to be rebuilt. In that case, make will forever see the dependency as
##TH## ./hack/run-in-gopath.sh go list \
# newer than the binary, and try to rebuild it over and over. So we touch it,
##TH## -f '{{.ImportPath}}{{"\n"}}{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
# and make is happy.
##TH## ./vendor/github.com/jteeuwen/go-bindata/go-bindata \
$(BINDATA_GEN)
:
$(k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata)
##TH## | grep --color=never "^$(PRJ_SRC_PATH)/" \
hack/make-rules/build.sh ./vendor/github.com/jteeuwen/go-bindata/go-bindata
##TH## | xargs ./hack/run-in-gopath.sh go list \
touch
$@
##TH## -f '{{$$d := .Dir}}{{$$d}}{{"\n"}}{{range .GoFiles}}{{$$d}}/{{.}}{{"\n"}}{{end}}' \
##TH## | paste -sd' ' - \
##TH## | sed 's/ / \\=,/g' \
##TH## | tr '=,' '\n\t' \
##TH## | sed "s|$$(pwd -P)/||"; \
##TH## ) > $@.tmp; \
##TH## if ! cmp -s $@.tmp $@; then \
##TH## if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
##TH## echo "DBG: $(BINDATA_GEN).mk changed"; \
##TH## fi; \
##TH## cat $@.tmp > $@; \
##TH## rm -f $@.tmp; \
##TH## fi
##TH##
##TH### Include dependency info for the generator tool. This will cause the rule of
##TH### the same name to be considered and if it is updated, make will restart.
##TH##sinclude $(META_DIR)/$(BINDATA_GEN).mk
##TH##
##TH### How to build the generator tool. The deps for this are defined in
##TH### the $(BINDATA_GEN).mk, above.
##TH###
##TH### A word on the need to touch: This rule might trigger if, for example, a
##TH### non-Go file was added or deleted from a directory on which this depends.
##TH### This target needs to be reconsidered, but Go realizes it doesn't actually
##TH### have to be rebuilt. In that case, make will forever see the dependency as
##TH### newer than the binary, and try to rebuild it over and over. So we touch it,
##TH### and make is happy.
##TH##$(BINDATA_GEN):
##TH## hack/make-rules/build.sh ./vendor/github.com/jteeuwen/go-bindata/go-bindata
##TH## touch $@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment