Assuming GNU make:
file := whatever.txt
variable := $(shell cat ${file})
More Related Contents:
- Make error: missing separator
- Creating Makefile with libraries
- Passing additional variables from command line to make
- What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?
- Recursive wildcards in GNU make?
- Makefile (Auto-Dependency Generation)
- Passing arguments to “make run”
- How does “make” app know default target to build if no target is specified?
- Getting make to create object files in a specific directory
- How to use all *.c files in a directory with the Cmake build system?
- crti.o file missing
- How to use LDFLAGS in makefile
- How do you get the list of targets in a makefile?
- Difference between CPPFLAGS and CXXFLAGS in GNU Make
- “multiple target patterns” Makefile error
- Passing the argument to CMAKE via command prompt
- How do I check if file exists in Makefile so I can delete it?
- GNU make yields “commands commence before first target” error
- How to ensure a target is run before all the other build rules in a makefile?
- Why .SECONDARY does not work with patterns (%) while .PRECIOUS does?
- Makefile variable assignment error in echo
- How do I write the ‘cd’ command in a makefile?
- Sources from subdirectories in Makefile
- How can I configure my makefile for debug and release builds?
- Run make in each subdirectory
- CFLAGS vs CPPFLAGS
- Wildcard targets in a Makefile
- How do I perform arithmetic in a makefile?
- Suppress make rule error output
- @ prefix when setting environment variable in Makefile