Is it possible to create a multi-line string variable in a Makefile

后端 未结 19 1931
借酒劲吻你
借酒劲吻你 2020-11-28 20:27

I want to create a makefile variable that is a multi-line string (e.g. the body of an email release announcement). something like

ANNOUNCE_BODY=\"
Version $         


        
相关标签:
19条回答
  • 2020-11-28 20:52

    I like alhadis's answer best. But to keep columnar formatting, add one more thing.

    SYNOPSIS := :: Synopsis: Makefile\
    | ::\
    | :: Usage:\
    | ::    make .......... : generates this message\
    | ::    make synopsis . : generates this message\
    | ::    make clean .... : eliminate unwanted intermediates and targets\
    | ::    make all ...... : compile entire system from ground-up\
    endef
    

    Outputs:

    :: Synopsis: Makefile 
    :: 
    :: Usage: 
    :: make .......... : generates this message 
    :: make synopsis . : generates this message 
    :: make clean .... : eliminate unwanted intermediates and targets 
    :: make all ...... : compile entire system from ground-up
    
    0 讨论(0)
提交回复
热议问题