Skip to content

Commit 1f0694b

Browse files
committed
reference the licenses.tmpl file like we do for other files inside modules
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
1 parent e91755f commit 1f0694b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

modules/licenses/01_mod.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
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: #
3332
shared_generate_targets += generate-go-licenses
3433

3534
define 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

4241
generate-go-licenses: $1/LICENSES
4342
# The /LICENSE targets make sure these files exist.

0 commit comments

Comments
 (0)