On Sat, 2024-01-27 at 20:00 +0100, Antonio Diaz Diaz wrote:
> In order to increase the efficiency of the build, I added empty
> recipes to my makefiles to prevent 'make' from trying to remake
> source files:

A simpler and more effective way to increase efficiency and reduce the
output of -d is to remove all the built-in rules.  Instead of defining
new pattern rules for these targets, remove existing pattern rules that
match them.  Make won't try to "build source files" if there's no
pattern rule it can use to do so.

If you have GNU Make 4.0 or higher, you can simply add:

    MAKEFLAGS += -r

to your makefile and it will remove all the built-in pattern rules.

If you want to continue to use older versions of GNU Make, you can get
mostly-equivalent behavior by adding this to your makefile:

    .SUFFIXES:
    %:: %,v
    %:: RCS/%,v
    %:: s.%
    %:: SCCS/s.%

-- 
Paul D. Smith <psm...@gnu.org>            Find some GNU make tips at:
https://www.gnu.org                       http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist

Reply via email to