mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-23 20:11:03 +00:00
buildsys improvements for generated files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
4e6598ef85
commit
2860777e61
@ -20,19 +20,23 @@ PERLMOD_GENPACKAGE := /usr/lib/perlmod/genpackage.pl \
|
||||
--lib-package=Proxmox::Lib::Common \
|
||||
--lib-prefix=Proxmox
|
||||
|
||||
# Point to any generated pm file (Proxmox/ dir is already present in this package)
|
||||
Proxmox/RS/CalendarEvent.pm:
|
||||
$(PERLMOD_GENPACKAGE) \
|
||||
PERLMOD_PACKAGES := \
|
||||
Proxmox::RS::APT::Repositories \
|
||||
Proxmox::RS::CalendarEvent \
|
||||
Proxmox::RS::Notify \
|
||||
Proxmox::RS::Subscription
|
||||
|
||||
all: Proxmox/RS/CalendarEvent.pm
|
||||
PERLMOD_PACKAGE_FILES := $(addsuffix .pm,$(subst ::,/,$(PERLMOD_PACKAGES)))
|
||||
|
||||
Proxmox/RS: $(PERLMOD_PACKAGE_FILES)
|
||||
$(PERLMOD_PACKAGE_FILES) &:
|
||||
$(PERLMOD_GENPACKAGE) $(PERLMOD_PACKAGES)
|
||||
|
||||
all: Proxmox/RS
|
||||
true
|
||||
|
||||
.PHONY: install
|
||||
install: Proxmox/RS/CalendarEvent.pm
|
||||
install: Proxmox/RS
|
||||
install -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
find PVE \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
|
||||
find Proxmox \! -type d -print -exec install -Dm644 '{}' $(DESTDIR)$(PERL_INSTALLVENDORLIB)'/{}' ';'
|
||||
|
@ -32,6 +32,8 @@ PERLMOD_PACKAGES := \
|
||||
PMG::RS::OpenId \
|
||||
PMG::RS::TFA
|
||||
|
||||
PERLMOD_PACKAGE_FILES := $(addsuffix .pm,$(subst ::,/,$(PERLMOD_PACKAGES)))
|
||||
|
||||
ifeq ($(BUILD_MODE), release)
|
||||
CARGO_BUILD_ARGS += --release
|
||||
TARGET_DIR=release
|
||||
@ -42,12 +44,13 @@ endif
|
||||
all: PMG
|
||||
cargo build $(CARGO_BUILD_ARGS)
|
||||
|
||||
Proxmox PMG: Proxmox/Lib/PMG.pm
|
||||
Proxmox/Lib/PMG.pm: Fixup.pm
|
||||
Proxmox: Proxmox/Lib/PMG.pm
|
||||
PMG: $(PERLMOD_PACKAGE_FILES)
|
||||
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 PMG
|
||||
install: target/release/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 -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
|
@ -32,6 +32,8 @@ PERLMOD_PACKAGES := \
|
||||
PVE::RS::ResourceScheduling::Static \
|
||||
PVE::RS::TFA
|
||||
|
||||
PERLMOD_PACKAGE_FILES := $(addsuffix .pm,$(subst ::,/,$(PERLMOD_PACKAGES)))
|
||||
|
||||
ifeq ($(BUILD_MODE), release)
|
||||
CARGO_BUILD_ARGS += --release
|
||||
TARGET_DIR=release
|
||||
@ -46,15 +48,16 @@ all: PVE
|
||||
's@^sub libfile.*$$@sub libfile { "$(shell pwd)/target/$(TARGET_DIR)/libpve_rs.so"; }@' \
|
||||
Proxmox/Lib/PVE.pm >test/Proxmox/Lib/PVE.pm
|
||||
|
||||
Proxmox PVE: Proxmox/Lib/PVE.pm
|
||||
Proxmox/Lib/PVE.pm: Fixup.pm
|
||||
Proxmox: Proxmox/Lib/PVE.pm
|
||||
PVE: $(PERLMOD_PACKAGE_FILES)
|
||||
Proxmox/Lib/PVE.pm $(PERLMOD_PACKAGE_FILES) &: Fixup.pm
|
||||
$(PERLMOD_GENPACKAGE) $(PERLMOD_PACKAGES)
|
||||
|
||||
check: all
|
||||
$(MAKE) -C test test
|
||||
|
||||
.PHONY: install
|
||||
install: target/release/libpve_rs.so Proxmox/Lib/PVE.pm PVE
|
||||
install: target/release/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 -d -m755 $(DESTDIR)$(PERL_INSTALLVENDORLIB)
|
||||
|
Loading…
Reference in New Issue
Block a user