Is it possible to create an executable script that would be interpreted by make?
I tried this:
#!/usr/bin/env make --makefile=/dev/stdin
main:
@echo Hello!
but it does not work – hangs until press Ctrl-c.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is normally all you need in a standard make file. The filename is implicitly passed as the last argument.
/dev/stdinhere is (usually) the tty. You can do the wholeenvthing if there’s a reason to, but often there’s no need.