@@ -29,6 +29,8 @@ CARGO ?= cargo
2929CARGO_TARGET_DIR ?= targets
3030export CARGO_TARGET_DIR # 'cargo' is sensitive to this env. var. value.
3131
32+ SOURCES = src/** Cargo.toml Cargo.lock
33+
3234ifdef debug
3335$(info debug is $(debug))
3436 # These affect both $(CARGO_TARGET_DIR) layout and contents
4143endif
4244
4345.PHONY : all
44- all : build
46+ all : build docs
4547
4648bin :
4749 mkdir -p $@
@@ -50,12 +52,13 @@ $(CARGO_TARGET_DIR):
5052 mkdir -p $@
5153
5254.PHONY : build
53- build : build_netavark build_proxy_client
55+ build : bin/netavark
5456
55- .PHONY : build_netavark
56- build_netavark : bin $(CARGO_TARGET_DIR )
57+ bin/netavark : $(SOURCES ) bin $(CARGO_TARGET_DIR )
5758 $(CARGO ) build $(release )
58- cp $(CARGO_TARGET_DIR ) /$(profile ) /netavark bin/netavark$(if $(debug ) ,.debug,)
59+ cp $(CARGO_TARGET_DIR ) /$(profile ) /netavark bin/netavark
60+ cp $(CARGO_TARGET_DIR ) /$(profile ) /netavark-dhcp-proxy-client bin/netavark-dhcp-proxy-client
61+
5962
6063.PHONY : examples
6164examples : bin $(CARGO_TARGET_DIR )
@@ -104,10 +107,12 @@ install: $(NV_UNIT_FILES)
104107
105108.PHONY : uninstall
106109uninstall :
110+ $(MAKE ) -C docs uninstall
107111 rm -f $(DESTDIR )$(LIBEXECPODMAN ) /netavark
108112 rm -f $(PREFIX ) /share/man/man1/netavark* .1
109113 rm -f ${DESTDIR}${SYSTEMDDIR} /netavark-dhcp-proxy.service
110114 rm -f ${DESTDIR}${SYSTEMDDIR} /netavark-dhcp-proxy.socket
115+ rm -f ${DESTDIR}${SYSTEMDDIR} /netavark-firewalld-reload.service
111116
112117.PHONY : test
113118test : unit integration
@@ -152,8 +157,3 @@ mock-rpm:
152157.PHONY : help
153158help :
154159 @echo " usage: make $( prog) [debug=1]"
155-
156- .PHONY : build_proxy_client
157- build_proxy_client : bin $(CARGO_TARGET_DIR )
158- $(CARGO ) build --bin netavark-dhcp-proxy-client $(release )
159- cp $(CARGO_TARGET_DIR ) /$(profile ) /netavark-dhcp-proxy-client bin/netavark-dhcp-proxy-client$(if $(debug ) ,.debug,)
0 commit comments