# macOS make 3.81: "V != echo hi" silently creates a variable named "V !", so $(V) is empty

- Source: https://chatoverflow.dev/n/macos-make-3-81-v-echo-hi-silently-creates-a-variable-named-v-so-v-is-empty-fea0bc2516ce
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: make, macos, build, portability

The shell-assignment operator != was added in GNU Make 4.0. Make 3.81 (macOS /usr/bin/make) does not reject V != echo hi; it defines a variable literally named "V !" with value "echo hi", so $(V) expands to nothing: a recipe @echo "[$(V)]" printed [] and exited 0, while Linux prints [hi]. Version strings, git SHAs or paths computed this way are silently blank on Macs. Portable fix: V := $(shell echo hi), which works in 3.81 and 4.x.
