File tree Expand file tree Collapse file tree 6 files changed +23
-7
lines changed Expand file tree Collapse file tree 6 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 11
11
# express or implied. See the License for the specific language governing
12
12
# permissions and limitations under the License.
13
13
14
+ GOMOD := $(shell go env GOMOD)
15
+ GOSUM := $(GOMOD:.mod=.sum )
16
+
14
17
all : agent
15
18
16
- agent : * .go
19
+ agent : * .go $( GOMOD ) $( GOSUM )
17
20
ifneq ($(STATIC_AGENT ) ,)
18
21
CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "-s" -o agent
19
22
else
Original file line number Diff line number Diff line change 11
11
# express or implied. See the License for the specific language governing
12
12
# permissions and limitations under the License.
13
13
14
+ GOMOD := $(shell go env GOMOD)
15
+ GOSUM := $(GOMOD:.mod=.sum )
16
+
14
17
all : examples
15
18
16
19
examples : taskworkflow
17
20
18
- taskworkflow : taskworkflow.go
21
+ taskworkflow : taskworkflow.go $( GOMOD ) $( GOSUM )
19
22
go build -o taskworkflow taskworkflow.go
20
23
21
24
clean :
Original file line number Diff line number Diff line change 15
15
EXTRAGOARGS: =
16
16
17
17
SOURCES: =$(shell find . -name '* .go')
18
+ GOMOD := $(shell go env GOMOD)
19
+ GOSUM := $(GOMOD:.mod=.sum )
18
20
19
21
all : runtime
20
22
21
23
runtime : containerd-shim-aws-firecracker
22
24
23
- containerd-shim-aws-firecracker : $(SOURCES )
25
+ containerd-shim-aws-firecracker : $(SOURCES ) $( GOMOD ) $( GOSUM )
24
26
go build -o containerd-shim-aws-firecracker
25
27
26
28
install : containerd-shim-aws-firecracker
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ EXTRAGOARGS:=
16
16
17
17
SUBDIRS: =cmd/devmapper cmd/naive
18
18
SOURCES: =$(shell find . -name '* .go')
19
+ GOMOD := $(shell go env GOMOD)
20
+ GOSUM := $(GOMOD:.mod=.sum )
19
21
20
22
all : $(SUBDIRS )
21
23
@@ -25,10 +27,10 @@ $(SUBDIRS):
25
27
install : $(SUBDIRS )
26
28
for d in $( SUBDIRS) ; do $( MAKE) -C $$ d install; done
27
29
28
- test : $(SOURCES )
30
+ test : $(SOURCES ) $( GOMOD ) $( GOSUM )
29
31
go test ./... $(EXTRAGOARGS )
30
32
31
33
clean :
32
34
for d in $( SUBDIRS) ; do $( MAKE) -C $$ d clean; done
33
35
34
- .PHONY : all $(SUBDIRS ) clean install
36
+ .PHONY : all $(SUBDIRS ) clean install test
Original file line number Diff line number Diff line change 11
11
# express or implied. See the License for the specific language governing
12
12
# permissions and limitations under the License.
13
13
14
+ GOMOD := $(shell go env GOMOD)
15
+ GOSUM := $(GOMOD:.mod=.sum )
16
+
14
17
all : devmapper_snapshotter
15
18
16
- devmapper_snapshotter : * .go
19
+ devmapper_snapshotter : * .go $( GOMOD ) $( GOSUM )
17
20
go build -o devmapper_snapshotter
18
21
19
22
install : devmapper_snapshotter
Original file line number Diff line number Diff line change 11
11
# express or implied. See the License for the specific language governing
12
12
# permissions and limitations under the License.
13
13
14
+ GOMOD := $(shell go env GOMOD)
15
+ GOSUM := $(GOMOD:.mod=.sum )
16
+
14
17
all : naive_snapshotter
15
18
16
- naive_snapshotter : * .go
19
+ naive_snapshotter : * .go $( GOMOD ) $( GOSUM )
17
20
go build -o naive_snapshotter
18
21
19
22
install : naive_snapshotter
You can’t perform that action at this time.
0 commit comments