File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515# ##################### Generate LICENSES files ######################
1616
17- # _top is the directory containing the top-level Makefile
18- _top = $(abspath $(dir $(firstword $(MAKEFILE_LIST ) ) ) )
17+ licenses_tmpl := $(dir $(lastword $(MAKEFILE_LIST ) ) ) /licenses.tmpl
1918
2019# Create a go.work file so that go-licenses can discover the LICENSE file of the
2120# other modules in the repo.
@@ -33,11 +32,11 @@ generate-go-licenses: #
3332shared_generate_targets += generate-go-licenses
3433
3534define licenses_target
36- $1/LICENSES: $1/go.mod $(licenses_go_work ) $(_top ) /make/_shared/licenses/licenses.tmpl | $(NEEDS_GO-LICENSES )
35+ $1/LICENSES: $1/go.mod $(licenses_go_work ) $(licenses_tmpl ) | $(NEEDS_GO-LICENSES )
3736 cd $$(dir $$@ ) && \
3837 GOWORK=$(abspath $(licenses_go_work ) ) \
3938 GOOS=linux GOARCH=amd64 \
40- $(GO-LICENSES ) report --ignore "$$(license_ignore ) " --template $(_top ) /make/_shared/licenses/licenses.tmpl ./... > LICENSES
39+ $(GO-LICENSES ) report --ignore "$$(license_ignore ) " --template $(abspath $( licenses_tmpl ) ) ./... > LICENSES
4140
4241generate-go-licenses: $1/LICENSES
4342# The /LICENSE targets make sure these files exist.
You can’t perform that action at this time.
0 commit comments