Hands-on task
Build a report from all logs via wildcard
In /root/proj there are several *.log files (you don't know in advance how many or what they're called). Write a Makefile with a report.txt target that gathers all the lines from all the *.log files into one sorted file report.txt. Don't hardcode the list of logs — pick it up with the $(wildcard *.log) function, and make report.txt depend on those logs. Bare make must build report.txt. The Makefile is handy to write in the Editor tab above the terminal: in a Makefile it puts a real TAB at the start of a recipe line.
- make
- wildcard
- makefile variables
- target dependencies