[FE training-materials-updates] slides/autotools-advanced: more details about variables
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed May 20 15:36:03 CEST 2015
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=5b95f552d1f171a80f207815161a01a58c7a70b1
>---------------------------------------------------------------
commit 5b95f552d1f171a80f207815161a01a58c7a70b1
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Wed May 20 14:56:23 2015 +0200
slides/autotools-advanced: more details about variables
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>---------------------------------------------------------------
5b95f552d1f171a80f207815161a01a58c7a70b1
slides/autotools-advanced/autotools-advanced.tex | 38 +++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/slides/autotools-advanced/autotools-advanced.tex b/slides/autotools-advanced/autotools-advanced.tex
index 5f8f012..7b8edb3 100644
--- a/slides/autotools-advanced/autotools-advanced.tex
+++ b/slides/autotools-advanced/autotools-advanced.tex
@@ -845,7 +845,11 @@ $ find /tmp/test
\begin{frame}[fragile]{Global {\em automake} variables}
\begin{itemize}
- \item Apply to the current \code{Makefile.am}
+ \item Variables that you can define in \code{Makefile.am}
+ \begin{itemize}
+ \item Apply to the current \code{Makefile.am}
+ \item Affect all products described in the current \code{Makefile.am}
+ \end{itemize}
\item \code{AM_CPPFLAGS}, default pre-processor flags
\item \code{AM_CFLAGS}, default compiler flags
\item \code{AM_LDFLAGS}, default linker flags
@@ -887,6 +891,38 @@ slice_threadinit_LDADD = $(top_builddir)/gthread/libgthread-2.0.la $(LDADD)
\end{block}
\end{frame}
+\begin{frame}[fragile]{Useful variables}
+
+ \begin{itemize}
+
+ \item Autoconf provides several variables that can be useful in your
+ \code{Makefile.am}:
+
+ \begin{itemize}
+
+ \item \code{top_srcdir}, the relative path to the top of the source tree
+ \item \code{srcdir}, the relative path to the directory that contains the current \code{Makefile}
+ \item \code{top_builddir}, the relative path to the top of the build tree
+ \item \code{builddir}, the current directory
+ \item \code{abs_top_srcdir}, \code{abs_srcdir},
+ \code{abs_top_builddir}, \code{abs_builddir}, absolute variants
+ of the previous variables
+ \end{itemize}
+
+ \item Example usage: library code in \code{lib/}, header files in
+ \code{include/}:
+ \begin{block}{lib/Makefile.am}
+ \begin{minted}[fontsize=\scriptsize]{make}
+lib_LTLIBRARIES = libhello.la
+libhello_la_SOURCES = ...
+libhello_la_CPPFLAGS = -I$(top_srcdir)/include
+\end{minted}
+\end{block}
+
+ \end{itemize}
+
+\end{frame}
+
\begin{frame}[fragile]{Silent rules}
\begin{itemize}
More information about the training-materials-updates
mailing list