do_tools=false
endif
-# Backwards compatiblility, do_tools=false|0 should disable all tools.
-ifneq ($(do_tools),true)
- do_linux_tools=
- do_cloud_tools=
-endif
-
-# Either tools package needs the common source preparation
-do_any_tools=$(sort $(filter-out false,$(do_linux_tools) $(do_cloud_tools)))
-
# Stages -- support both DEB_STAGE=stage1 and DEB_BUILD_PROFILE=bootstrap
ifeq ($(DEB_STAGE),stage1)
DEB_BUILD_PROFILE=bootstrap
do_flavour_header_package=false
endif
+# Disable tools build and packaging if do_tools != true
+ifneq ($(do_tools),true)
+ do_linux_tools=
+ do_cloud_tools=
+endif
+
+# Either tools package needs the common source preparation
+do_any_tools=$(sort $(filter-out false,$(do_linux_tools) $(do_cloud_tools)))
+
# autopkgtest -- rebuild support
# only build the first flavour on the assumption it is representative
ifeq ($(DEB_BUILD_PROFILE),autopkgtest)