From 2465f9248e1e2737479fad5065d8310a860ce415 Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Fri, 12 Feb 2021 05:25:23 -0300 Subject: 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 --- src/man/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/man') diff --git a/src/man/Makefile.in b/src/man/Makefile.in index 1598935ca..3711d5cec 100644 --- a/src/man/Makefile.in +++ b/src/man/Makefile.in @@ -1,3 +1,4 @@ +.PHONY: all all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-profile.man firemon.man jailtest.man include ../common.mk @@ -5,7 +6,9 @@ include ../common.mk %.man: %.txt gawk -f ./preproc.awk -- $(MANFLAGS) < $< > $@ +.PHONY: clean clean:; rm -fr *.man +.PHONY: distclean distclean: clean rm -fr Makefile -- cgit v1.2.3-54-g00ecf