[bootlin/training-materials updates] master: Makefile: improve help with a common HELP_FIELD_FORMAT (14b3e080)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Apr 25 12:12:57 CEST 2019


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/14b3e0803c9ea60ae8d375f81309705d6b4431ab

>---------------------------------------------------------------

commit 14b3e0803c9ea60ae8d375f81309705d6b4431ab
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Thu Apr 25 12:10:23 2019 +0200

    Makefile: improve help with a common HELP_FIELD_FORMAT
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


>---------------------------------------------------------------

14b3e0803c9ea60ae8d375f81309705d6b4431ab
 Makefile | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 3dbbe8ac..2cef5a52 100644
--- a/Makefile
+++ b/Makefile
@@ -291,19 +291,21 @@ all: $(foreach p,$(ALL_TRAININGS),full-$(p)-slides.pdf full-$(p)-labs.pdf $(p)-a
 list-courses:
 	@echo $(ALL_TRAININGS)
 
+HELP_FIELD_FORMAT = " %-34s %s\n"
+
 help:
 	@echo "Available targets:"
 	@echo
 	$(foreach p,$(ALL_TRAININGS),\
-		@printf " %-30s %s\n" "full-$(p)-labs.pdf" "Complete labs for the '$(p)' course"$(sep))
+		@printf $(HELP_FIELD_FORMAT) "full-$(p)-labs.pdf" "Complete labs for the '$(p)' course"$(sep))
 	$(foreach p,$(ALL_TRAININGS),\
-		@printf " %-30s %s\n" "full-$(p)-slides.pdf" "Complete slides for the '$(p)' course"$(sep))
+		@printf $(HELP_FIELD_FORMAT) "full-$(p)-slides.pdf" "Complete slides for the '$(p)' course"$(sep))
 	$(foreach p,$(ALL_TRAININGS),\
-		@printf " %-30s %s\n" "$(p)-agenda.pdf" "Agenda for the '$(p)' course"$(sep))
+		@printf $(HELP_FIELD_FORMAT) "$(p)-agenda.pdf" "Agenda for the '$(p)' course"$(sep))
 	$(foreach p,$(ALL_TRAININGS),\
-		@printf " %-30s %s\n" "$(p)-labs.tar.xz" "Lab data for the '$(p)' course"$(sep))
+		@printf $(HELP_FIELD_FORMAT) "$(p)-labs.tar.xz" "Lab data for the '$(p)' course"$(sep))
 	@echo
-	@printf " %-30s %s\n" "<some-chapter>-slides.pdf" "Slides for a particular chapter in slides/"
-	@printf " %-30s %s\n" "<some-chapter>-labs.pdf" "Labs for a particular chapter in labs/"
+	@printf $(HELP_FIELD_FORMAT) "<some-chapter>-slides.pdf" "Slides for a particular chapter in slides/"
+	@printf $(HELP_FIELD_FORMAT) "<some-chapter>-labs.pdf" "Labs for a particular chapter in labs/"
 	@echo
-	@printf " %-30s %s\n" "list-courses" "List all courses"
+	@printf $(HELP_FIELD_FORMAT) "list-courses" "List all courses"




More information about the training-materials-updates mailing list