help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsing the Makefiles


From: Bob Proulx
Subject: Re: Parsing the Makefiles
Date: Sat, 28 Nov 2020 23:52:02 -0700

Peter Bocan wrote:
> - how does Make differentiate if the target of a rule is a file or
> - not? I have noticed that there are occurrences where files are
>   checking for  „.o“ files.

Perhaps make's implicit rules set is causing confusion here?  Implicit
rules are compiled into make to perform actions in addition to the
explicit rules in the Makefiles in the current directory.

You can read about the implicit rules here.

    
https://www.gnu.org/software/make/manual/html_node/Implicit-Rules.html#Implicit-Rules

You can run make with the -p option to print out the rules.  Perhaps
something like this would be useful?  Others might suggest different
commands that might be more useful.

    make -pn -f/dev/null | less

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]