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

后端 未结 19 2029
借酒劲吻你
借酒劲吻你 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:46

    Just a postscript to Eric Melski's answer: You can include the output of commands in the text, but you must use the Makefile syntax "$(shell foo)" rather than the shell syntax "$(foo)". For example:

    define ANNOUNCE_BODY  
    As of $(shell date), version $(VERSION) of $(PACKAGE_NAME) has been released.  
    
    It can be downloaded from $(DOWNLOAD_URL).  
    
    endef
    

提交回复
热议问题