title: Why does an escaped variable $$ work and not $
body: <p>This is a follow up question to the previous one I had asked in the thread:</p>
  
  <p><a href="https://stackoverflow.com/questions/42812768/search-subdirectories-and-update-path-variables-in-makefile">search subdirectories and update path variables in makefile</a></p>
  
  <p>In the following:</p>
  
  <p>There is a rules makefile which adds various standard defines,
  Include.mak. It has a define:</p>
  
  <pre><code>RESOLVED_PATH=$(subst $(abspath .)/,,$(abspath $(1)))
  </code></pre>
  
  <p>It is being used in another makefile:</p>
  
  <pre><code>include Include.mak
  
  ROOT:=.
  define UPDATE_GUI
  d:= $$(strip $(1))
  GUI_FOLDER:= $(ROOT)/$(d)
  GUI_ALL:=$(call RESOLVED_PATH,$(GUI_FOLDER)/$(d)_generated.txt)
  $$(warning GUI_ALL is set to $$(GUI_ALL))
  endef
  
  TARGET_FILE:= ProjectParms.rb
  
  ACTIVE_GUIS = $(wildcard GUI*/$(TARGET_FILE))
  GUIS_OF_INTEREST = $(dir $(ACTIVE_GUIS))
  GUIS= $(patsubst %/,%,$(GUIS_OF_INTEREST))
  $(foreach GUI, $(GUIS), $(eval  $(call UPDATE_GUI, $(GUI))))
  </code></pre>
  
  <p>This does not give the output as desired, but if I expand the same in the line:</p>
  
  <pre><code>GUI_ALL:=$$(subst $$(abspath .)/,,$$(abspath $$(GUI_FOLDER)/$$(d)_generated.txt)
  
  $$(warning GUI_ALL is set to $$(GUI_ALL))
  </code></pre>
  
  <p>It works fine, can someone tell me why? The $(call RESOLVED_PATH, Param ) is being used throughout the make project in different places (though no $(warning '') is being used anywhere else, I am just using that for a quick sanity check.</p>