From 6815d71cff0da41651b12f5b07df8e471969bbec Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Wed, 7 Feb 2024 09:39:13 -0300 Subject: [PATCH] build: fix running make clean with undefined vars In the `debian_ci` job in .gitlab-ci.yml, dpkg-deb calls `make distclean` before calling ./configure, which makes `make clean` fail due to certain variables not being declared: dpkg-source -i -I --before-build . [...] dh_auto_clean make -j2 distclean make[1]: Entering directory '/builds/kmk3/firejail_ci' error: run ./configure to generate config.mk [...] rm -f contrib/syntax/files/example [...] rm -fr - -.tar.xz rm: invalid option -- '.' Try 'rm --help' for more information. make[1]: *** [Makefile:175: clean] Error 1 This amends commit 8a783cdc2 ("build: use TARNAME and remove more paths on clean", 2023-07-29) / PR #6186. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b15d16b6a..808a9beac 100644 --- a/Makefile +++ b/Makefile @@ -174,9 +174,9 @@ clean: $(MAKE) -C test clean rm -f $(SECCOMP_FILTERS) rm -f $(SYNTAX_FILES) - rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz - rm -f $(TARNAME)*.deb - rm -f $(TARNAME)*.rpm + rm -fr ./$(TARNAME)-$(VERSION) ./$(TARNAME)-$(VERSION).tar.xz + rm -f ./$(TARNAME)*.deb + rm -f ./$(TARNAME)*.rpm .PHONY: distclean distclean: clean