[FE training-materials-updates] Creating the authors variable using git
Alexandre Belloni
alexandre.belloni at free-electrons.com
Fri Mar 22 18:02:45 CET 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : authors
Link : http://git.free-electrons.com/training-materials/commit/?id=d56708dca66ea8dba53a3fd1f4726b4fb2729ac4
>---------------------------------------------------------------
commit d56708dca66ea8dba53a3fd1f4726b4fb2729ac4
Author: Alexandre Belloni <alexandre.belloni at free-electrons.com>
Date: Fri Mar 22 14:05:03 2013 +0100
Creating the authors variable using git
Only issue: Sébastien Jan is disappearing from the authors.
>---------------------------------------------------------------
d56708dca66ea8dba53a3fd1f4726b4fb2729ac4
Makefile | 15 +++++++++++++--
common/android-title.tex | 2 +-
common/kernel-title.tex | 2 +-
common/sysdev-title.tex | 2 +-
4 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index ca3dc1d..3e7bfb2 100644
--- a/Makefile
+++ b/Makefile
@@ -313,6 +313,7 @@ ifdef SLIDES
ifeq ($(firstword $(subst -, , $(SLIDES))),full)
SLIDES_TRAINING = $(lastword $(subst -, , $(SLIDES)))
SLIDES_COMMON_BEFORE = common/slide-header.tex \
+ out/authors.tex \
common/$(SLIDES_TRAINING)-title.tex
SLIDES_CHAPTERS = $($(call UPPERCASE, $(SLIDES_TRAINING))_SLIDES)
SLIDES_COMMON_AFTER = common/slide-footer.tex
@@ -320,9 +321,9 @@ else
SLIDES_TRAINING = $(firstword $(subst -, , $(SLIDES)))
SLIDES_CHAPTERS = $(filter $(SLIDES)%, $($(call UPPERCASE, $(SLIDES_TRAINING))_SLIDES))
ifeq ($(words $(SLIDES_CHAPTERS)),1)
-SLIDES_COMMON_BEFORE = common/slide-header.tex common/single-subsection-slide-title.tex
+SLIDES_COMMON_BEFORE = common/slide-header.tex out/authors.tex common/single-subsection-slide-title.tex
else
-SLIDES_COMMON_BEFORE = common/slide-header.tex common/single-slide-title.tex
+SLIDES_COMMON_BEFORE = common/slide-header.tex out/authors.tex common/single-slide-title.tex
endif
SLIDES_COMMON_AFTER = common/slide-footer.tex
endif
@@ -334,9 +335,19 @@ SLIDES_TEX = \
$(SLIDES_COMMON_AFTER)
SLIDES_PICTURES = $(call PICTURES,$(foreach s,$(SLIDES_CHAPTERS),slides/$(s))) $(COMMON_PICTURES)
+SLIDES_FOLDER = \
+ $(foreach s,$(SLIDES_CHAPTERS),$(wildcard slides/$(s))) \
+
%-slides.pdf: $(VARS) $(SLIDES_TEX) $(SLIDES_PICTURES) $(STYLESHEET)
@echo $(SLIDES_CHAPTERS_NUM)
@mkdir -p $(OUTDIR)
+# generate a list of authors, based on git commits
+ rm -f $(OUTDIR)/authors.log
+ for d in $(SLIDES_FOLDER) ; do \
+ git log --format='%aN' $$d >> $(OUTDIR)/authors.log; \
+ done
+ echo -n "\authors{" > $(OUTDIR)/authors.tex
+ sort -u -f $(OUTDIR)/authors.log | sed -e 's/$$/,/' | xargs echo | sed -e 's/,$$/}/' >> $(OUTDIR)/authors.tex
# We generate a .tex file with \input{} directives (instead of just
# concatenating all files) so that when there is an error, we are
# pointed at the right original file and the right line in that file.
diff --git a/common/android-title.tex b/common/android-title.tex
index 64f61f8..ec9f04e 100644
--- a/common/android-title.tex
+++ b/common/android-title.tex
@@ -1,4 +1,4 @@
-\authors{Maxime Ripard}
+%\authors{Maxime Ripard}
\title{Android System Development}
\trainingurl{http://free-electrons.com/doc/training/android}
diff --git a/common/kernel-title.tex b/common/kernel-title.tex
index 2785031..441f939 100644
--- a/common/kernel-title.tex
+++ b/common/kernel-title.tex
@@ -1,4 +1,4 @@
-\authors{Grégory Clément, Michael Opdenacker, Maxime Ripard, Sébastien Jan, Thomas Petazzoni}
+%\authors{Grégory Clément, Michael Opdenacker, Maxime Ripard, Sébastien Jan, Thomas Petazzoni}
\trainingurl{http://free-electrons.com/doc/training/linux-kernel}
\titleframe{Linux Kernel and Driver Development Training}
diff --git a/common/sysdev-title.tex b/common/sysdev-title.tex
index 6720bc9..0caa85c 100644
--- a/common/sysdev-title.tex
+++ b/common/sysdev-title.tex
@@ -1,4 +1,4 @@
-\authors{Grégory Clément, Michael Opdenacker, Maxime Ripard, Thomas Petazzoni}
+%\authors{Grégory Clément, Michael Opdenacker, Maxime Ripard, Thomas Petazzoni}
\trainingurl{http://free-electrons.com/doc/training/embedded-linux}
\titleframe{Embedded Linux system development}
More information about the training-materials-updates
mailing list