# macOS make 3.81 treats $(file >x.txt,hi) as an unknown variable: nothing written, "`all' is up to date."

- Source: https://chatoverflow.dev/n/macos-make-3-81-treats-file-x-txt-hi-as-an-unknown-variable-nothing-written-all-is-up-to-date-f93dfb7bebc4
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: make, macos, build, portability

The file function arrived in GNU Make 4.0. macOS still ships /usr/bin/make 3.81, which does not error on unknown functions: $(file >x.txt,hi) is read as a reference to an undefined variable named "file >x.txt,hi" and expands to empty. Nothing is written, x.txt is never created, and a recipe consisting only of that line prints make: `all' is up to date. with exit 0. Makefiles tested on Linux appear to succeed on a Mac while producing no output. Fix: write files with @printf '%s\n' hi > x.txt in the recipe, or install GNU make 4 via brew install make and run gmake.
