all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Elias Huhsovitz <e.huhsovitz@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Subject: [PATCH proxmox-perl-rs 1/3] makefile: use TARGET_DIR variable for install target
Date: Tue, 27 Oct 2026 11:49:33 +0100	[thread overview]
Message-ID: <20261027104935.49190-2-e.huhsovitz@proxmox.com> (raw)
In-Reply-To: <20261027104935.49190-1-e.huhsovitz@proxmox.com>

Currently calling 'make all' and 'make install' fails, because make
builds a debug binary inside 'target/debug'. 'make install' is hardcoded
to always install the release binary inside of 'target/release/'.

Replace the hardcoded install path with the TARGET_DIR variable, so that
'make install' installs the binary compiled with 'make all'.

Release builds can still be compiled and installed by using
'BUILD_MODE=release make all' and 'BUILD_MODE=release make install'

Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
---
 pmg-rs/Makefile | 4 ++--
 pve-rs/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pmg-rs/Makefile b/pmg-rs/Makefile
index a873143..d5063f9 100644
--- a/pmg-rs/Makefile
+++ b/pmg-rs/Makefile
@@ -71,9 +71,9 @@ Proxmox/Lib/PMG.pm $(PERLMOD_PACKAGE_FILES) &: Fixup.pm
 	$(PERLMOD_GENPACKAGE) $(PERLMOD_PACKAGES)
 
 .PHONY: install
-install: target/release/libpmg_rs.so Proxmox/Lib/PMG.pm $(PERLMOD_PACKAGE_FILES)
+install: target/$(TARGET_DIR)/libpmg_rs.so Proxmox/Lib/PMG.pm $(PERLMOD_PACKAGE_FILES)
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
-	install -m644 target/release/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
+	install -m644 target/$(TARGET_DIR)/libpmg_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpmg_rs.so
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib
 	install -m644 Proxmox/Lib/PMG.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PMG.pm
diff --git a/pve-rs/Makefile b/pve-rs/Makefile
index bb1cd2d..1e3e792 100644
--- a/pve-rs/Makefile
+++ b/pve-rs/Makefile
@@ -89,9 +89,9 @@ check: all
 	$(MAKE) -C test test
 
 .PHONY: install
-install: target/release/libpve_rs.so Proxmox/Lib/PVE.pm $(PERLMOD_PACKAGE_FILES)
+install: target/$(TARGET_DIR)/libpve_rs.so Proxmox/Lib/PVE.pm $(PERLMOD_PACKAGE_FILES)
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto
-	install -m644 target/release/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
+	install -m644 target/$(TARGET_DIR)/libpve_rs.so $(DESTDIR)$(PERL_INSTALLVENDORARCH)/auto/libpve_rs.so
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
 	install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib
 	install -m644 Proxmox/Lib/PVE.pm $(DESTDIR)$(PERL_INSTALLVENDORLIB)/Proxmox/Lib/PVE.pm
-- 
2.47.3





  reply	other threads:[~2026-10-27 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 10:49 [PATCH proxmox-perl-rs 0/3] makefile: reduce ambiguity for targets: all/install/upload Elias Huhsovitz
2026-10-27 10:49 ` Elias Huhsovitz [this message]
2026-10-27 10:49 ` [PATCH proxmox-perl-rs 2/3] makefile: add Fixup.pm as prerequisite for $(BUILDDIR) Elias Huhsovitz
2026-10-27 10:49 ` [PATCH proxmox-perl-rs 3/3] makefile: use UPLOAD_DIST variable Elias Huhsovitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261027104935.49190-2-e.huhsovitz@proxmox.com \
    --to=e.huhsovitz@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal