* [PATCH proxmox-perl-rs 1/3] makefile: use TARGET_DIR variable for install target
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
2026-10-27 10:49 ` [PATCH proxmox-perl-rs 2/3] makefile: add Fixup.pm as prerequisite for $(BUILDDIR) Elias Huhsovitz
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Elias Huhsovitz @ 2026-10-27 10:49 UTC (permalink / raw)
To: pve-devel; +Cc: Elias Huhsovitz
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH proxmox-perl-rs 2/3] makefile: add Fixup.pm as prerequisite for $(BUILDDIR)
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 ` [PATCH proxmox-perl-rs 1/3] makefile: use TARGET_DIR variable for install target Elias Huhsovitz
@ 2026-10-27 10:49 ` Elias Huhsovitz
2026-10-27 10:49 ` [PATCH proxmox-perl-rs 3/3] makefile: use UPLOAD_DIST variable Elias Huhsovitz
2026-10-30 13:28 ` superseded: [PATCH proxmox-perl-rs 0/3] makefile: reduce ambiguity for targets: all/install/upload Elias Huhsovitz
3 siblings, 0 replies; 5+ messages in thread
From: Elias Huhsovitz @ 2026-10-27 10:49 UTC (permalink / raw)
To: pve-devel; +Cc: Elias Huhsovitz
Fixup.pm is used inside of the $(BUILDDIR) target, but not listed as a
prerequisite. Modyfing Fixup.pm will not result in re-generating
$(BUILDDIR).
Add Fixup.pm as a prerequisite.
Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
---
pmg-rs/Makefile | 2 +-
pve-rs/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pmg-rs/Makefile b/pmg-rs/Makefile
index d5063f9..5025aae 100644
--- a/pmg-rs/Makefile
+++ b/pmg-rs/Makefile
@@ -97,7 +97,7 @@ upload: $(DEBS)
git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pmg --dist $(DEB_DISTRIBUTION)
-$(BUILDDIR): src debian common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml
+$(BUILDDIR): src debian common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml Fixup.pm
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp/common
diff --git a/pve-rs/Makefile b/pve-rs/Makefile
index 1e3e792..3ae66c1 100644
--- a/pve-rs/Makefile
+++ b/pve-rs/Makefile
@@ -114,7 +114,7 @@ upload: $(DEBS)
git diff --exit-code --stat && git diff --exit-code --stat --staged
tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(DEB_DISTRIBUTION)
-$(BUILDDIR): src debian test common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml
+$(BUILDDIR): src debian test common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml Fixup.pm
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp
mkdir $(BUILDDIR).tmp/common
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH proxmox-perl-rs 3/3] makefile: use UPLOAD_DIST variable
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 ` [PATCH proxmox-perl-rs 1/3] makefile: use TARGET_DIR variable for install target Elias Huhsovitz
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 ` Elias Huhsovitz
2026-10-30 13:28 ` superseded: [PATCH proxmox-perl-rs 0/3] makefile: reduce ambiguity for targets: all/install/upload Elias Huhsovitz
3 siblings, 0 replies; 5+ messages in thread
From: Elias Huhsovitz @ 2026-10-27 10:49 UTC (permalink / raw)
To: pve-devel; +Cc: Elias Huhsovitz
The variable UPLOAD_DIST is never used in the upload target.
Utilize the UPLOAD_DIST variable. This mirrors the design of the
proxmox-backup Makefile and unties the upload dist name from the debian
dist name.
Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
---
pmg-rs/Makefile | 2 +-
pve-rs/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pmg-rs/Makefile b/pmg-rs/Makefile
index 5025aae..f5d31a2 100644
--- a/pmg-rs/Makefile
+++ b/pmg-rs/Makefile
@@ -95,7 +95,7 @@ upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
# check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged
- tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pmg --dist $(DEB_DISTRIBUTION)
+ tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pmg --dist $(UPLOAD_DIST)
$(BUILDDIR): src debian common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml Fixup.pm
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
diff --git a/pve-rs/Makefile b/pve-rs/Makefile
index 3ae66c1..f9ba49c 100644
--- a/pve-rs/Makefile
+++ b/pve-rs/Makefile
@@ -112,7 +112,7 @@ upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: $(DEBS)
# check if working directory is clean
git diff --exit-code --stat && git diff --exit-code --stat --staged
- tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(DEB_DISTRIBUTION)
+ tar cf - $(DEBS) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
$(BUILDDIR): src debian test common/src Cargo.toml rustfmt.toml Makefile .cargo/config.toml Fixup.pm
rm -rf $(BUILDDIR) $(BUILDDIR).tmp
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* superseded: [PATCH proxmox-perl-rs 0/3] makefile: reduce ambiguity for targets: all/install/upload
2026-10-27 10:49 [PATCH proxmox-perl-rs 0/3] makefile: reduce ambiguity for targets: all/install/upload Elias Huhsovitz
` (2 preceding siblings ...)
2026-10-27 10:49 ` [PATCH proxmox-perl-rs 3/3] makefile: use UPLOAD_DIST variable Elias Huhsovitz
@ 2026-10-30 13:28 ` Elias Huhsovitz
3 siblings, 0 replies; 5+ messages in thread
From: Elias Huhsovitz @ 2026-10-30 13:28 UTC (permalink / raw)
To: Elias Huhsovitz, pve-devel
Superseded-By: https://lore.proxmox.com/pve-devel/20261030132533.150795-1-e.huhsovitz@proxmox.com/
^ permalink raw reply [flat|nested] 5+ messages in thread