PT-2506 - make install does not install Go tools

- Modified Makefile.PL, so it installs Go tools as well
- Added clean instruction for Go tools
This commit is contained in:
Sveta Smirnova
2026-01-09 16:22:46 +03:00
parent 588bf78d65
commit 861ca3f0ae

View File

@@ -3,8 +3,18 @@ use ExtUtils::MY;
sub MY::postamble {
return <<'MAKE_GOTOOLS';
pkgs = $(shell find src/go -type d -name "pt-*" -exec basename {} \;)
gotools:
cd src/go && $(MAKE) build
@$(foreach pkg,$(pkgs),cp bin/$(pkg) $(INST_SCRIPT);)
goclean:
@$(foreach pkg,$(pkgs),rm -f bin/$(pkg) 2> /dev/null;)
all :: gotools
install :: gotools
clean :: goclean
MAKE_GOTOOLS
}
@@ -18,7 +28,7 @@ WriteMakefile(
map {
(my $name = $_) =~ s/^bin.//;
my $file_name = $_;
if ( $file_name =~ m/(mongo|pg|galera|k8s|secure)/ ) {
if ( $file_name =~ m/(mongo|pg|galera|k8s|secure)/ ) {
# We have to put empty line here to avoid the MAN1PODS hash corruption
'' => '',
}