Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
35dac82e
Commit
35dac82e
authored
13 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
language fixes for the section on conditional builds. Thanks to Dan for writing this
[[Imported from SVN: r6478]]
parent
3ccff0a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/buildsystem/buildsystem.tex
+14
-14
14 additions, 14 deletions
doc/buildsystem/buildsystem.tex
with
14 additions
and
14 deletions
doc/buildsystem/buildsystem.tex
+
14
−
14
View file @
35dac82e
...
...
@@ -1362,17 +1362,17 @@ installed or not. As an example, we show in this section a \dune module with sug
for the modules
\texttt
{
dune-localfunctions
}
and
\texttt
{
dune-pdelab
}
.
A subdirectory
\texttt
{
my
\_
pdelab
\_
application
}
should only be built if these optional modules
are installed. We assume that your project is set up in the traditional
\texttt
{
automake
}
fashion
that
there is a
\texttt
{
Makefile.am
}
in every subdirectory.
\texttt
{
automake
}
fashion
, i.e.
there is a
\texttt
{
Makefile.am
}
in every subdirectory.
Suppose your
\texttt
{
dune.module
}
file has dependencies
t
o
\texttt
{
dune-localfunctions
}
and
\texttt
{
D
une-
PDEL
ab
}
specified in the
\texttt
{
Suggests
}
section:
Suppose your
\texttt
{
dune.module
}
file has dependencies o
n
\texttt
{
dune-localfunctions
}
and
\texttt
{
d
une-
pdel
ab
}
specified in the
\texttt
{
Suggests
}
section:
\begin{lstlisting}
[language=make]
# in the dune.module file
Module: my
_
application
Depends: dune-common dune-grid dune-istl
Suggests: dune-localfunctions dune-pdelab
\end{lstlisting}
There are three steps to
be
take
n
now:
There are three steps to take now:
\begin{enumerate}
\item
Call
\texttt
{
DUNE
\_
CHECK
\_
MODULES
}
from your local
\texttt
{
\textit
{
MODULE
}
\_
CHECK
\_
MODULE
}
macro to implicitly define an
\texttt
{
AM
\_
CONDITIONAL
}
.
...
...
@@ -1384,10 +1384,10 @@ There are three steps to be taken now:
\minisec
{
The automake conditional
}
If you call the macro
\texttt
{
DUNE
\_
CHECK
\_
MODULES
}
during your build process,
an
\texttt
{
AM
\_
CONDITIONAL
}
named
\texttt
{
HAVE
\_\textit
{
SUGGESTEDMODULE
}}
is defined where
\texttt
{
\textit
{
SUGGESTEDMODULE
}}
is the name of the suggested module in upper case and
any
\texttt
{
-
}
replaced by
\texttt
{
\_
}
. For example for
\texttt
{
dune-pdelab
}
,
the
\texttt
{
\textit
{
SUGGESTEDMODULE
}}
is the name of the suggested module in upper case
,
and
with
any
\texttt
{
-
}
replaced by
\texttt
{
\_
}
. For example
,
for
\texttt
{
dune-pdelab
}
the
name would be
\texttt
{
HAVE
\_
DUNE
\_
PDELAB
}
.
\texttt
{
DUNE
\_
CHECK
\_
MODULES
}
is defined in
\texttt
{
dune-common/m4/dune.m4
}
, and it is
very well
documented there.
is defined in
\texttt
{
dune-common/m4/dune.m4
}
, and it is documented there.
You should not call
\texttt
{
DUNE
\_
CHECK
\_
MODULES
}
directly but in your local
\texttt
{
m4
}
file in your module where your module's checks are defined,
see section
\ref
{
m4files
}
. For instance, if your module is
\texttt
{
dune-foo
}
,
...
...
@@ -1400,23 +1400,23 @@ AC_DEFUN([DUNE_FOO_CHECK_MODULE],
\end{lstlisting}
This way, the requested
\texttt
{
AM
\_
CONDITIONAL
}
is created implicitly.
\minisec
{
The Makfile.am clause
}
\minisec
{
The Mak
e
file.am clause
}
Having the
\texttt
{
AM
\_
CONDITIONAL
}
named
\texttt
{
HAVE
\_
DUNE
\_
PDELAB
}
defined, you can use it in any
\texttt
{
Makefile.am
}
of your project
to optionally build subdirectories or applications using dune-pdelab:
to optionally build subdirectories or applications using
\texttt
{
dune-pdelab
}
:
\begin{lstlisting}
[language=make]
# build the directory my
_
pdelab
_
application if pdelab is installed
# build the directory my
_
pdelab
_
application if
dune-
pdelab is installed
SUBDIRS = appl1 appl2
if HAVE
_
DUNE
_
PDELAB
SUBDIRS += my
_
pdelab
_
application
endif
\end{lstlisting}
Compare this
\dune
-specific conditional build to general conditional builds in
section
\ref
{
makefile.am
}
,
\texttt
{
conditional builds
}
.
Compare this
\dune
-specific conditional build to general conditional builds in
Section~
\ref
{
makefile.am
}
.
\minisec
{
The configure.ac entry
}
Additionally, you have to specify in your
\texttt
{
configure.ac
}
(section
\ref
{
configure.ac
}
) that the
M
akefile in the directory
(section
\ref
{
configure.ac
}
) that the
m
akefile in the directory
\texttt
{
my
\_
pdelab
\_
application
}
should be built:
\begin{lstlisting}
[language=make]
AC
_
CONFIG
_
FILES([Makefile
...
...
@@ -1427,7 +1427,7 @@ AC_CONFIG_FILES([Makefile
AC
_
OUTPUT
\end{lstlisting}
Now, your project is prepared to build the subdirectory
\texttt
{
my
\_
pdelab
\_
application
}
only if
\texttt
{
D
une-
PDEL
ab
}
is successfully
\texttt
{
my
\_
pdelab
\_
application
}
if and
only if
\texttt
{
d
une-
pdel
ab
}
is successfully
installed on your machine.
\section
{
Further documentation
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment