Heredoc in a Makefile?

前端 未结 7 1045
半阙折子戏
半阙折子戏 2020-12-25 12:36

Is this possible at all and how?

Update: I need this because I create a file both from dynamic and static data.

Use case:

7条回答
  •  失恋的感觉
    2020-12-25 13:10

    It appears there is no way to do a here-document in Makefile. However, there is a possible workaround. Use echo to send the here-document data:

    all:
        echo "some text" | myScript.sh
    

提交回复
热议问题