I'm trying to run a Python snippet inside a Make target, but I'm having trouble trying to figure out how these things work in Make.Here is my attempt so far:define BROWSER_PYSCRIPTimport os, webbrowser, systry:    from urllib import pathname2urlexcept:    from urllib.request import pathname2urlwebbrowser.open(file:// + pathname2url(os.path.abspath(sys.argv[1])))endefBROWSER := $(shell python -c '$(BROWSER_PYSCRIPT)')I wanted to use $(BROWSER) in a target like:docs:    #.. compile docs    $(BROWSER) docs/index.htmlIs this really a bad idea?
Using embedded python script in Makefile
python;make
Related: https://stackoverflow.com/q/649246/4937930You cannot recall a multi-line variable as is in a single recipe, it rather gets expanded to multiple recipes and causes syntax error.A possible workaround would be:export BROWSER_PYSCRIPTBROWSER := python -c $$BROWSER_PYSCRIPTdocs:        #.. compile docs        $(BROWSER) docs/index.html