Why .SECONDARY does not work with patterns (%) while .PRECIOUS does?

前端 未结 2 2069
感情败类
感情败类 2020-11-30 12:38

My question is to understand better what i missed in make process and .SECONDARY purpose vs .PRECIOUS, not to get my script working, since it does work already.

I am

相关标签:
2条回答
  • 2020-11-30 13:18

    Thanks to Alex (see answer) i went further in my search.

    What i found is that it is recorded in TODO.private of make project for 15 years ....

    Using git://git.savannah.gnu.org/make.git you can see history of TODO.private content :

     6) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
        pseudo-targets have different capabilities.  For example, .PRECIOUS
        can take a "%", the others can't.  Etc.  These should all work the
        same, insofar as that makes sense.
    

    These should all work the same, insofar as that makes sense. but was not coded.

    0 讨论(0)
  • 2020-11-30 13:25

    The answer to "Why .SECONDARY does not work with patterns (%) while .PRECIOUS does?" is here: the document says

    You can also list the target pattern of an implicit rule (such as ‘%.o’) as a prerequisite file of the special target .PRECIOUS

    but does not say this about .SECONDARY. But for the few explicit exceptions, none of the special targets accept patterns.

    0 讨论(0)
提交回复
热议问题