Skip to content

Commit

Permalink
build: fix running make clean with undefined vars
Browse files Browse the repository at this point in the history
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 8a783cd ("build: use TARNAME and remove more paths
on clean", 2023-07-29) / PR netblue30#6186.
  • Loading branch information
kmk3 committed Feb 7, 2024
1 parent 97d5a79 commit 6815d71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6815d71

Please sign in to comment.