Skip to content

Commit f2f3eb3

Browse files
committed
Makefile: add phony targets for generating all assets of a training
Sometimes you want to build-test all training content once you modified some slides. Add PHONY targets: ⟩ # generate slides/labs/agendas/tarballs for all three variants ⟩ make linux-kernel ⟩ ⟩ # same thing for the audio training: ⟩ # full-audio-slides.pdf audio-agenda.pdf audio-fr-agenda.pdf ⟩ # audio-online-agenda.pdf audio-online-fr-agenda.pdf ⟩ make audio Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
1 parent ae924a6 commit f2f3eb3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Makefile‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ all: $(ALL_SLIDES) $(ALL_LABS) $(ALL_AGENDAS) $(ALL_LABS_TARBALLS)
336336
list-courses:
337337
@echo $(ALL_TRAININGS)
338338

339+
.PHONY: $(ALL_TRAININGS) linux-kernel
340+
$(ALL_TRAININGS) linux-kernel:
341+
$(MAKE) \
342+
$(filter full-$@%,$(ALL_SLIDES)) \
343+
$(filter full-$@%,$(ALL_LABS)) \
344+
$(filter $@%,$(ALL_AGENDAS)) \
345+
$(filter $@%,$(ALL_LABS_TARBALLS))
346+
339347
HELP_FIELD_FORMAT = " %-36s %s\n"
340348

341349
help:
@@ -361,3 +369,5 @@ help:
361369
@printf $(HELP_FIELD_FORMAT) "<some-chapter>-labs.pdf" "Labs for a particular chapter in labs/"
362370
@echo
363371
@printf $(HELP_FIELD_FORMAT) "list-courses" "List all courses"
372+
@printf $(HELP_FIELD_FORMAT) "<course>" "Slides, labs, agendas and tarballs for the course"
373+
@printf $(HELP_FIELD_FORMAT) "linux-kernel" "Slides, labs, agendas and tarballs for all variants of the course"

0 commit comments

Comments
 (0)