I started to analyse the TI X-Loader, including it's makefiles. I found the following lines in the top makefile:

TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) and

ifeq (include/config.mk,$(wildcard include/config.mk)) ... Regarding the first line: i know that "$PWD" means the value of PWD (the working directory)
My question:
why the double dollar sign in this special case?
Regarding the second line: I'm trying to understand what is compared and why. I already red the GNU MAKE manual wildcard explanation. I'm still missing something.
My questions:
what is the "$(wildcard" for?
Which config.mk files exactly are compared to each other?
Why are they compared? (this question is more about the makefile structure)
Thanks for your help in advance.

Check Solution