Skip to content

Commit

Permalink
Merge pull request #1824 from owncloud/update-build-target
Browse files Browse the repository at this point in the history
Update Build Targets
  • Loading branch information
wkloucek authored Mar 22, 2021
2 parents ec0e962 + 48fe247 commit 1fa2c5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,14 @@ go-coverage:
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME)

.PHONY: build-all
build-all: build build-debug

.PHONY: build
build: $(BIN)/$(EXECUTABLE) $(BIN)/$(EXECUTABLE)-debug
build: $(BIN)/$(EXECUTABLE)

.PHONY: build-debug
build-debug: $(BIN)/$(EXECUTABLE)-debug

$(BIN)/$(EXECUTABLE): $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME)
Expand Down
8 changes: 8 additions & 0 deletions changelog/unreleased/build-all-targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Enhancement: Add new build targets

Make build target `build` used to build a binary twice, the second occurrence having symbols for debugging. We split this step in two and added `build-all` and `build-debug` targets.

- `build-all` now behaves as the previous `build` target, it will generate 2 binaries, one for debug.
- `build-debug` will build a single binary for debugging.

https://github.com/owncloud/ocis/pull/1824

0 comments on commit 1fa2c5f

Please sign in to comment.