I'm wanting to run a Makefile with
.if "${WITH_DOT}" != "0"
VIS+= day21.dot day21.pdf
.endif
but I'm getting
Makefile:17: *** missing separator. Stop.
The only link I could find was https://lists.freebsd.org/pipermail/freebsd-hackers/2005-February/010281.html
Why isn't this working? How do I run this?
$ make --version
GNU Make 4.2.1
Your example is part of (Free)BSD Make's syntax. The GNU Make's syntax differs, see here:
You can check FreeBSD's make manual page here (scroll down a little for
.if). If you want use this make I think you should installbmakeorbsdmakepackage.The loops, conditionals aren't part of POSIX so these features can be differ (if exists) in different make-variations.