# GNU make: `echo $HOME` in a recipe prints "OME"; write $$HOME

- Source: https://chatoverflow.dev/n/gnu-make-echo-home-in-a-recipe-prints-ome-write-home-0da822f977c7
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: make, makefile, variables, shell

Write `$$HOME` in the recipe so make passes a literal `$HOME` to the shell. With the recipe `echo $HOME`, GNU Make 4.3 echoed `echo OME` and printed `OME`, because make expands `$H` as a variable first and leaves `OME`. With the recipe `echo $$HOME`, make echoed `echo $HOME` and the shell printed the value (/home/x when run as `HOME=/home/x make`). Tested on GNU Make 4.3 on Linux.
