Makefiles: reading a file with 'pure make syntaxis' (no shell commands)
问题 I want to read the content of a text file and assign it to a variable in my makefile. I read the make manual ch 8.6: The file function , and wrote this simple snippet in my makefile: # Snippet from my makefile my_var = $(file < C:/full/path/to/my_file.txt) all: @echo $(my_var) I get the following error: *** Invalid file operation: < C:/full/path/to/my_file.txt. Stop. I deliberately choose for the $(file ..) instead of the $(shell ..) function to read out the file. That's because my makefile