Description:
I have the following snippet within my GNU makefile:
test:=$(shell grep '#pragma' test_types.h)
$(info test:$(test))
The above results in the following error message:
*** unterminated call to function 'shell': missing ')'. STOP
However if I remove the '#' from the snippet above:
test:=$(shell grep 'pragma' test_types.h)
$(info test:$(test))
The output is:
test: #pragma pack(push, 1) #pragma pack(pop)
If I run the following directly from the command line: grep '#pragma' test_types.h. The output is again:
#pragma pack(push, 1) #pragma pack(pop)
Question:
What is causing the shell function behaviour when combining grep with a search for # within a GNU makefile?