Skip to content

Commit

Permalink
Merge pull request #6186 from kmk3/build-improve-clean
Browse files Browse the repository at this point in the history
build: improve main clean target
  • Loading branch information
kmk3 authored Feb 4, 2024
2 parents db3146b + e150b86 commit 71ffe7a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.swp
*.deb
*.rpm
*.tar.xz
*.gcda
*.gcno
*.gz
Expand All @@ -20,7 +21,6 @@ config.status
contrib/syntax/files/example
contrib/syntax/files/firejail-profile.lang
contrib/syntax/files/firejail.vim
firejail-*.tar.xz
src/fnettrace-dns/fnettrace-dns
src/fnettrace-sni/fnettrace-sni
src/fnettrace-icmp/fnettrace-icmp
Expand Down
18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,10 @@ clean:
$(MAKE) -C src/man clean
$(MAKE) -C test clean
rm -f $(SECCOMP_FILTERS)
rm -f firejail*.rpm
rm -f $(SYNTAX_FILES)
rm -f src/fnettrace/static-ip-map
rm -f test/utils/index.html*
rm -f test/utils/wget-log
rm -f test/utils/firejail-test-file*
rm -f test/utils/lstesting
rm -f test/environment/index.html*
rm -f test/environment/wget-log*
rm -fr test/environment/-testdir
rm -f test/environment/logfile*
rm -f test/environment/index.html
rm -f test/environment/wget-log
rm -f test/sysutils/firejail_t*
cd test/compile; ./compile.sh --clean; cd ../..
rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz
rm -f $(TARNAME)*.deb
rm -f $(TARNAME)*.rpm

.PHONY: distclean
distclean: clean
Expand Down Expand Up @@ -339,7 +328,6 @@ DISTFILES_TEST = \

.PHONY: dist
dist: clean config.mk
rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz
mkdir -p $(TARNAME)-$(VERSION)/test
cp -a $(DISTFILES) $(TARNAME)-$(VERSION)
cp -a $(DISTFILES_TEST) $(TARNAME)-$(VERSION)/test
Expand Down
2 changes: 2 additions & 0 deletions src/fnettrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ MOD_DIR = $(ROOT)/src/$(MOD)
PROG = $(MOD_DIR)/$(MOD)
TARGET = $(PROG)

CLEANFILES += static-ip-map

include $(ROOT)/src/prog.mk

all: $(TARGET) static-ip-map
Expand Down
10 changes: 10 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ $(TESTS):
.PHONY: clean
clean:
for test in $(TESTS); do rm -f "$$test/$$test.log"; done
rm -fr environment/-testdir
rm -f environment/index.html*
rm -f environment/logfile*
rm -f environment/wget-log*
rm -f sysutils/firejail_t*
rm -f utils/firejail-test-file*
rm -f utils/index.html*
rm -f utils/lstesting
rm -f utils/wget-log
cd compile && ./compile.sh --clean

0 comments on commit 71ffe7a

Please sign in to comment.