1) How the makefile execution flow works, In case suppose makefile-1 includes another makefile-2 and makefile-2 includes another makefile-3 ?
2) In case if the included makefiles contains some rules and variables that are supposed to be used by all three - how it works ? what happens if one includes the same makefile more than once ?
3) Use of export for variables of included makefile ? - Are they available in all of there makefile,
what is my understanding, The makefile interpreter(or I don't know which term suits better here) reads as line in the makefile, and if there is any include directive it makes all the variable/rules available in the makefile(top level make-which includes other).
4) But what happens if two included makefiles overrides variables or rule of each others ? Is it like the last included makefile takes the priority ?
5) If any rule in the included makefile calls the rule of top level makefile, does it executes top level makefile entirely (starting from the first line) ?
6) there are two kind of assignments in make:
i) expanded at the time of use (=)
ii) expanded at the time of declaration (:=) How this kind of variables handles in multilevel makefiles ?
7) what happens if I use gnumake's functions like notdir, patsubt when I creates a list
File = abc def ghi
File += $(notdir ghi/jkl)
when does this notdir call happens ?
(and also if I use ':=' what will be the difference ?)
Consider make contains following rule, Does it gets called at the time when dependency is resolved ?
rule : File