If you want to fix the script, here is one possibility (I haven't actually tested it, but I'm pretty sure it'll work):
```bash
version.tex:
	/bin/echo -n '\newcommand{\OPTversion}{' > version.tex
	/bin/echo -n "$$(git describe --always --long)" >> version.tex
	/bin/echo -n '}' >> version.tex
```