Skip to content

Commit

Permalink
debugging: labs: replace $< with $^ in system_profiling lab Makefile
Browse files Browse the repository at this point in the history
While both $< and $^ are valid to manipulate a single prerequisite in a
makefile target, it can lead to silent issue when updating the makefile.
For example, we need to add the tracepoint provider generated object at
some point in the final binary, and it is very likely that both trainer and
trainees will forget to update this symbol to take all prerequisites
instead of only the first one, if they do not copy-paste directly the
makefile sample given in labs instruction

Prevent this omision by using directly $^ in base Makefile for system
profiling lab.

Signed-off-by: Alexis Lothoré <[email protected]>
  • Loading branch information
Tropicao committed Dec 5, 2023
1 parent 7abb29f commit 65fbfd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lab-data/debugging/nfsroot/root/system_profiling/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export CC=${CROSS_COMPILE}gcc

crc_random: crc_random.c
${CC} $< -g3 -o $@
${CC} $^ -g3 -o $@

0 comments on commit 65fbfd4

Please sign in to comment.