buildsys: try to avoid duplicate build due to "phony" docs dependency
Make docs target depend directly on the some docs-only required binaries and add a new intermediate ".do-cargo-build" target that is explicitly not a PHONY target. That avoids one extra set of full builds. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
415690a0e7
commit
424d2d68d3
12
Makefile
12
Makefile
@ -73,7 +73,7 @@ DESTDIR=
|
||||
|
||||
tests ?= --workspace
|
||||
|
||||
all: cargo-build $(SUBDIRS)
|
||||
all: $(SUBDIRS)
|
||||
|
||||
.PHONY: $(SUBDIRS)
|
||||
$(SUBDIRS):
|
||||
@ -134,6 +134,7 @@ 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
|
||||
@ -145,10 +146,15 @@ dinstall: ${SERVER_DEB} ${SERVER_DBG_DEB} ${CLIENT_DEB} ${CLIENT_DBG_DEB}
|
||||
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:
|
||||
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
|
||||
@ -163,8 +169,8 @@ cargo-build:
|
||||
--bin proxmox-tape \
|
||||
--bin pxar \
|
||||
--bin sg-tape-cmd
|
||||
touch "$@"
|
||||
|
||||
$(COMPILED_BINS): cargo-build
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
|
Loading…
Reference in New Issue
Block a user