[FE training-materials-updates] Makefile: add a warning when building a single chapter that can't be built

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Aug 27 17:17:18 CEST 2013


Repository : git://git.free-electrons.com/training-materials.git

On branch  : kernel-ng
Link       : http://git.free-electrons.com/training-materials/commit/?id=e3bde5f6f4e8f4eab58e80f724733ac538e65354

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

commit e3bde5f6f4e8f4eab58e80f724733ac538e65354
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Tue Aug 27 17:14:00 2013 +0200

    Makefile: add a warning when building a single chapter that can't be built
    
    To be able to use the feature that allows to build a single chapter,
    the chapter name must start with the session name, i.e either
    android-, kernel- or sysdev-. In order to avoid researching why
    building a chapter called 'foo' doesn't work, we add a warning to tell
    the user about this.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

e3bde5f6f4e8f4eab58e80f724733ac538e65354
 Makefile |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 02b109d..681562f 100644
--- a/Makefile
+++ b/Makefile
@@ -328,6 +328,10 @@ endif
 SLIDES_COMMON_AFTER  = common/slide-footer.tex
 endif
 
+ifeq ($(SLIDES_CHAPTERS),)
+$(error "No chapter to build, maybe you're building a single chapter whose name doesn't start with a training session name")
+endif
+
 # Compute the set of corresponding .tex files and pictures
 SLIDES_TEX      = \
 	$(SLIDES_COMMON_BEFORE) \



More information about the training-materials-updates mailing list