Skip to content

Commit

Permalink
update build routine in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Jun 7, 2021
1 parent 93adc82 commit b27efc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test: setup

define __create_dist()
mkdir -p dist/$(1)_$(2)/$(DIST)
GOOS=$1 GOARCH=$2 go build -o dist/$(1)_$(2)/$(DIST)/$(NAME)$(3) main.go
GOOS=$1 GOARCH=$2 go build -o dist/$(1)_$(2)/$(DIST)/$(NAME)$(3) main.go args.go timer.go
cp -r README.md LICENSE dist/$(1)_$(2)/$(DIST)
tar cvfz dist/$(DIST)_$(1)_$(2).tar.gz -C dist/$(1)_$(2) $(DIST)
endef
Expand All @@ -24,8 +24,8 @@ dist: all
@$(call __create_dist,windows,amd64,.exe)
@$(call __create_dist,linux,amd64,)

build: main.go
go build -o $(NAME) -v main.go
build: main.go args.go timer.go
go build -o $(NAME) -v main.go args.go timer.go

clean:
@rm -f nml *~
7 changes: 7 additions & 0 deletions timer_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "testing"

func TestDuration(t *testing.T) {

}

0 comments on commit b27efc4

Please sign in to comment.