aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-02-12 05:25:23 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2021-03-01 16:07:43 -0300
commit2465f9248e1e2737479fad5065d8310a860ce415 (patch)
tree09ef4bd8d73c98b7cb8a23f6cc2b8ed6d43576a9 /Makefile.in
parentmakefiles: fix misc blank line consistency (diff)
downloadfirejail-2465f9248e1e2737479fad5065d8310a860ce415.tar.gz
firejail-2465f9248e1e2737479fad5065d8310a860ce415.tar.zst
firejail-2465f9248e1e2737479fad5065d8310a860ce415.zip
makefiles: make all, clean and distclean PHONY
Avoid a stat() call for each affected target and also potentially speed up parallel builds. From the GNU make manual[1]: > Phony targets are also useful in conjunction with recursive > invocations of make (see Recursive Use of make). In this situation > the makefile will often contain a variable which lists a number of > sub-directories to be built. [...] > The implicit rule search (see Implicit Rules) is skipped for .PHONY > targets. This is why declaring a target as .PHONY is good for > performance, even if you are not worried about the actual file > existing. Commands used to search, replace and cleanup: $ find -type f -name '*Makefile.in' -exec sed -i.bak \ -e 's/^all:/.PHONY: all\nall:/' \ -e 's/^clean:/.PHONY: clean\nclean:/' \ -e 's/^distclean:/.PHONY: distclean\ndistclean:/' '{}' + $ find -type f -name '*Makefile.in.bak' -exec rm '{}' + [1]: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 8f399a2ab..bc03ab9ce 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -23,6 +23,7 @@ endif
23 23
24COMPLETIONDIRS = src/zsh_completion src/bash_completion 24COMPLETIONDIRS = src/zsh_completion src/bash_completion
25 25
26.PHONY: all
26all: all_items mydirs $(MAN_TARGET) filters 27all: all_items mydirs $(MAN_TARGET) filters
27APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailtest/jailtest 28APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailtest/jailtest
28SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee 29SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee
@@ -72,6 +73,7 @@ seccomp.mdwx: src/fseccomp/fseccomp
72seccomp.mdwx.32: src/fseccomp/fseccomp 73seccomp.mdwx.32: src/fseccomp/fseccomp
73 src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32 74 src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32
74 75
76.PHONY: clean
75clean: 77clean:
76 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ 78 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
77 $(MAKE) -C $$dir clean; \ 79 $(MAKE) -C $$dir clean; \
@@ -91,6 +93,7 @@ clean:
91 rm -f test/sysutils/firejail_t* 93 rm -f test/sysutils/firejail_t*
92 cd test/compile; ./compile.sh --clean; cd ../.. 94 cd test/compile; ./compile.sh --clean; cd ../..
93 95
96.PHONY: distclean
94distclean: clean 97distclean: clean
95 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ 98 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
96 $(MAKE) -C $$dir distclean; \ 99 $(MAKE) -C $$dir distclean; \