I'd like to be able to execute python from a makefile using $(shell ...) command. The trick however is that I do not want to write a full python script.
Here is what I'm trying to do:
VAR = $(shell python -c '''
import argparse
import sys
def main():
print(r'Hello world')
if '__main__' == __name__:
main()
''')
I have tried different variations of this but it doesn't work. There is always something - missing separator, incorrect indentation, unknown symbol etc. Has anybody done anything like this before?
Any help is appreciated.