[FE training-materials-updates] slides/autotools-advanced: two additional slides

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu May 21 17:26:05 CEST 2015


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

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=684ff31e27b1c72789af0c2304c15e8b4d9a5d50

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

commit 684ff31e27b1c72789af0c2304c15e8b4d9a5d50
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Thu May 21 17:25:39 2015 +0200

    slides/autotools-advanced: two additional slides
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


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

684ff31e27b1c72789af0c2304c15e8b4d9a5d50
 slides/autotools-advanced/autotools-advanced.tex | 61 ++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/slides/autotools-advanced/autotools-advanced.tex b/slides/autotools-advanced/autotools-advanced.tex
index 4d3c3d6..d84292e 100644
--- a/slides/autotools-advanced/autotools-advanced.tex
+++ b/slides/autotools-advanced/autotools-advanced.tex
@@ -1011,6 +1011,67 @@ dist_doc_DATA = doc/pcre.txt
 
 \end{frame}
 
+\begin{frame}[fragile]{Macro directory}
+
+  \begin{itemize}
+
+  \item By default, all the third-party {\em autoconf} macros get
+    copied into the (very large) \code{aclocal.m4} file.
+
+  \item It is possible to get some of the third-party macros copied to
+    individiual files in a separate directory, which is nicer.
+
+  \item Directory declared using \code{AC_CONFIG_MACRO_DIR}, generally
+    named \code{m4} by convention:
+    \begin{block}{configure.ac}
+      \begin{minted}{bash}
+AC_CONFIG_MACRO_DIR([m4])
+\end{minted}
+\end{block}
+
+\item The \code{ACLOCAL_AMFLAGS} in \code{Makefile.am} should also be
+  adjusted:
+
+\begin{block}{Makefile.am}
+  \begin{minted}{make}
+ACLOCAL_AMFLAGS = -I m4
+\end{minted}
+\end{block}
+
+\item For now, mainly used by \code{libtool} for its own {\em m4}
+  macros.
+
+  \end{itemize}
+
+\end{frame}
+
+\begin{frame}[fragile]{Auxiliary directory}
+
+  \begin{itemize}
+
+  \item The {\em auxiliary files} generated by {\em autotools} such as
+    \code{compile}, \code{config.guess}, \code{config.sub},
+    \code{depcomp}, etc. are by default in the main directory of the
+    source tree.
+
+  \item This clutters the main directory with lots of files, which may
+    not be very pleasant.
+
+  \item \code{AC_CONFIG_AUX_DIR} allows to customize where these files
+    are generated:
+    \begin{block}{configure.ac}
+      \begin{minted}{bash}
+AC_CONFIG_AUX_DIR([build-aux])
+\end{minted}
+\end{block}
+
+\item One condition: it must be placed before the call to
+  \code{AM_INIT_AUTOMAKE}.
+
+  \end{itemize}
+
+\end{frame}
+
 \setuplabframe
 {More advanced {\em autotools} usage}
 {



More information about the training-materials-updates mailing list