# Binaries usable by admins
USR_SBIN := \
- proxmox-backup-manager
+ proxmox-backup-manager \
+ proxmox-backup-debug \
# Binaries for services:
SERVICE_BIN := \
SUBCRATES := \
pbs-api-types \
pbs-buildcfg \
+ pbs-client \
pbs-datastore \
+ pbs-fuse-loop \
pbs-runtime \
pbs-systemd \
- pbs-tools
+ pbs-tools \
+ proxmox-backup-banner \
+ proxmox-backup-client \
+ proxmox-backup-debug \
+ pxar-bin
ifeq ($(BUILD_MODE), release)
CARGO_BUILD_ARGS += --release
tests ?= --workspace
-all: cargo-build $(SUBDIRS)
+all: $(SUBDIRS)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
rm -rf build
mkdir build
cp -a debian \
- Cargo.toml build.rs src \
+ Cargo.toml src \
$(SUBCRATES) \
docs etc examples tests www zsh-completions \
defines.mk Makefile \
.PHONY: clean distclean deb clean
distclean: clean
-clean: clean-debs
+clean: clean-deb
$(foreach i,$(SUBDIRS), \
$(MAKE) -C $(i) clean ;)
$(CARGO) clean
+ rm -f .do-cargo-build
find . -name '*~' -exec rm {} ';'
# allows one to avoid running cargo clean when one just wants to tidy up after a packgae build
dpkg -i $^
# make sure we build binaries before docs
-docs: cargo-build
+docs: $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen
.PHONY: cargo-build
cargo-build:
- $(CARGO) build $(CARGO_BUILD_ARGS)
+ rm -f .do-cargo-build
+ $(MAKE) $(COMPILED_BINS)
+
+$(COMPILED_BINS) $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen: .do-cargo-build
+.do-cargo-build:
+ RUSTFLAGS="--cfg openid" $(CARGO) build $(CARGO_BUILD_ARGS) \
+ --bin proxmox-backup-api \
+ --bin proxmox-backup-proxy \
+ --bin proxmox-backup-manager \
+ --bin docgen
+ $(CARGO) build $(CARGO_BUILD_ARGS) \
+ --package proxmox-backup-banner \
+ --bin proxmox-backup-banner \
+ --package proxmox-backup-client \
+ --bin proxmox-backup-client \
+ --package proxmox-backup-debug \
+ --bin proxmox-backup-debug \
+ --package pxar-bin \
+ --bin pxar \
+ --package proxmox-backup \
+ --bin dump-catalog-shell-cli \
+ --bin pmt --bin pmtx \
+ --bin proxmox-daily-update \
+ --bin proxmox-file-restore \
+ --bin proxmox-restore-daemon \
+ --bin proxmox-tape \
+ --bin pxar \
+ --bin sg-tape-cmd
+ touch "$@"
-$(COMPILED_BINS): cargo-build
.PHONY: lint
lint:
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
$(MAKE) -C www install
$(MAKE) -C docs install
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) test # HACK, only test now to avoid clobbering build files with wrong config
+endif
.PHONY: upload
upload: ${SERVER_DEB} ${CLIENT_DEB} ${RESTORE_DEB} ${DOC_DEB}