[FE training-materials-updates] buildroot-new-packages: .config variables accessible as make variables
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Tue May 5 16:28:41 CEST 2015
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=3c3cb4e72c16755dc121b15c000fcec81421109c
>---------------------------------------------------------------
commit 3c3cb4e72c16755dc121b15c000fcec81421109c
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Tue May 5 16:28:18 2015 +0200
buildroot-new-packages: .config variables accessible as make variables
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>---------------------------------------------------------------
3c3cb4e72c16755dc121b15c000fcec81421109c
.../buildroot-new-packages.tex | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/slides/buildroot-new-packages/buildroot-new-packages.tex b/slides/buildroot-new-packages/buildroot-new-packages.tex
index 7e97097..d354198 100644
--- a/slides/buildroot-new-packages/buildroot-new-packages.tex
+++ b/slides/buildroot-new-packages/buildroot-new-packages.tex
@@ -429,6 +429,39 @@ endef
\end{itemize}
\end{frame}
+\begin{frame}[fragile]{{\tt .mk} file: accessing the configuration}
+
+ \begin{itemize}
+ \item The Buildroot \code{.config} file is a succession of lines
+ \code{name = value}
+ \begin{itemize}
+ \item This file is valid {\em make} syntax!
+ \end{itemize}
+ \item The main Buildroot \code{Makefile} simply includes it, which
+ turns every Buildroot configuration option into a {\em make}
+ variable.
+ \item From a package \code{.mk} file, one can directly use such
+ variables:
+ \begin{block}{}
+ \begin{minted}[fontsize=\tiny]{make}
+ifeq ($(BR2_PACKAGE_LIBCURL),y)
+...
+endif
+
+FOO_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff)
+\end{minted}
+\end{block}
+
+\item Hint: use the {\em make} \code{qstrip} function to remove double
+ quotes on string options:
+\begin{block}{}
+ \begin{minted}[fontsize=\tiny]{make}
+NODEJS_MODULES_LIST = $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL))
+ \end{minted}
+\end{block}
+ \end{itemize}
+\end{frame}
+
\begin{frame}{Download related variables}
\begin{itemize}
\item \code{<pkg>_SITE}, {\bf download location}
More information about the training-materials-updates
mailing list