Create a variable in a makefile by reading contents of another file

Assuming GNU make:

file := whatever.txt
variable := $(shell cat ${file})

Leave a Comment