简体   繁体   中英

Makefile that generates executables that run Node scripts

How can I make a Makefile that will generate an executable, say myscript for example, which translates to the following:

node myscript.js param1

So all I have to run is

myscript param1

Have it generate a file with the following contents:

#!/bin/sh

node myscript.js "$@"

And then have it mark the file executable ( chmod +x myscript ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM