520 |
in the \texttt{tools} directory) to generate a Makefile. |
in the \texttt{tools} directory) to generate a Makefile. |
521 |
\texttt{genmake2} is a shell script written to work with all |
\texttt{genmake2} is a shell script written to work with all |
522 |
``sh''--compatible shells including bash v1, bash v2, and Bourne. |
``sh''--compatible shells including bash v1, bash v2, and Bourne. |
523 |
Internally, \texttt{genmake2} determines the locations of needed |
%Internally, \texttt{genmake2} determines the locations of needed |
524 |
files, the compiler, compiler options, libraries, and Unix tools. It |
%files, the compiler, compiler options, libraries, and Unix tools. It |
525 |
relies upon a number of ``optfiles'' located in the |
%relies upon a number of ``optfiles'' located in the |
526 |
\texttt{tools/build\_options} directory. |
%\texttt{tools/build\_options} directory. |
527 |
|
\texttt{genmake2} parses information from the following sources: |
528 |
|
\begin{description} |
529 |
|
\item[-] a {\em gemake\_local} file if one is found in the current |
530 |
|
directory |
531 |
|
\item[-] command-line options |
532 |
|
\item[-] an "options file" as specified by the command-line option |
533 |
|
\texttt{--optfile=/PATH/FILENAME} |
534 |
|
\item[-] a {\em packages.conf} file (if one is found) with the |
535 |
|
specific list of packages to compile. The search path for |
536 |
|
file {\em packages.conf} is, first, the current directory and |
537 |
|
then each of the "MODS" directories in the given order (see below). |
538 |
|
\end{description} |
539 |
|
|
540 |
|
\subsubsection{Optfiles in \texttt{tools/build\_options} directory:} |
541 |
|
|
542 |
The purpose of the optfiles is to provide all the compilation options |
The purpose of the optfiles is to provide all the compilation options |
543 |
for particular ``platforms'' (where ``platform'' roughly means the |
for particular ``platforms'' (where ``platform'' roughly means the |
610 |
\begin{rawhtml} </A> \end{rawhtml} |
\begin{rawhtml} </A> \end{rawhtml} |
611 |
mailing list. |
mailing list. |
612 |
|
|
613 |
|
\subsubsection{Command-line options:} |
614 |
|
|
615 |
In addition to the optfiles, \texttt{genmake2} supports a number of |
In addition to the optfiles, \texttt{genmake2} supports a number of |
616 |
helpful command-line options. A complete list of these options can be |
helpful command-line options. A complete list of these options can be |
617 |
obtained from: |
obtained from: |
634 |
the user's path. When these three items have been identified, |
the user's path. When these three items have been identified, |
635 |
genmake2 will try to find an optfile that has a matching name. |
genmake2 will try to find an optfile that has a matching name. |
636 |
|
|
637 |
\item[\texttt{--pdefault='PKG1 PKG2 PKG3 ...'}] specifies the default |
\item[\texttt{--mods='DIR1 DIR2 DIR3 ...'}] specifies a list of |
638 |
set of packages to be used. The normal order of precedence for |
directories containing ``modifications''. These directories contain |
639 |
packages is as follows: |
files with names that may (or may not) exist in the main MITgcm |
640 |
\begin{enumerate} |
source tree but will be overridden by any identically-named sources |
641 |
\item If available, the command line (\texttt{--pdefault}) settings |
within the ``MODS'' directories. |
642 |
over-rule any others. |
|
643 |
|
The order of precedence for this "name-hiding" is as follows: |
644 |
\item Next, \texttt{genmake2} will look for a file named |
\begin{itemize} |
645 |
``\texttt{packages.conf}'' in the local directory or in any of the |
\item ``MODS'' directories (in the order given) |
646 |
directories specified with the \texttt{--mods} option. |
\item Packages either explicitly specified or provided by default |
647 |
|
(in the order given) |
648 |
\item Finally, if neither of the above are available, |
\item Packages included due to package dependencies (in the order |
649 |
\texttt{genmake2} will use the \texttt{/pkg/pkg\_default} file. |
that that package dependencies are parsed) |
650 |
\end{enumerate} |
\item The "standard dirs" (which may have been specified by the |
651 |
|
``-standarddirs'' option) |
652 |
|
\end{itemize} |
653 |
|
|
654 |
|
\item[\texttt{--pgroups=/PATH/FILENAME}] specifies the file |
655 |
|
where package groups are defined. If not set, the package-groups |
656 |
|
definition will be read from {\em pkg/pkg\_groups}. |
657 |
|
It also contains the default list of packages (defined |
658 |
|
as the group ``{\it default\_pkg\_list}'' which is used |
659 |
|
when no specific package list ({\em packages.conf}) |
660 |
|
is found in current directory or in any "MODS" directory. |
661 |
|
|
662 |
\item[\texttt{--pdepend=/PATH/FILENAME}] specifies the dependency file |
\item[\texttt{--pdepend=/PATH/FILENAME}] specifies the dependency file |
663 |
used for packages. |
used for packages. |
664 |
|
|
683 |
"STAF" compiler. As with any compilers, it is helpful to have their |
"STAF" compiler. As with any compilers, it is helpful to have their |
684 |
directories listed in your {\tt \$PATH} environment variable. |
directories listed in your {\tt \$PATH} environment variable. |
685 |
|
|
|
\item[\texttt{--mods='DIR1 DIR2 DIR3 ...'}] specifies a list of |
|
|
directories containing ``modifications''. These directories contain |
|
|
files with names that may (or may not) exist in the main MITgcm |
|
|
source tree but will be overridden by any identically-named sources |
|
|
within the ``MODS'' directories. |
|
|
|
|
|
The order of precedence for this "name-hiding" is as follows: |
|
|
\begin{itemize} |
|
|
\item ``MODS'' directories (in the order given) |
|
|
\item Packages either explicitly specified or provided by default |
|
|
(in the order given) |
|
|
\item Packages included due to package dependencies (in the order |
|
|
that that package dependencies are parsed) |
|
|
\item The "standard dirs" (which may have been specified by the |
|
|
``-standarddirs'' option) |
|
|
\end{itemize} |
|
|
|
|
686 |
\item[\texttt{--mpi}] This option enables certain MPI features (using |
\item[\texttt{--mpi}] This option enables certain MPI features (using |
687 |
CPP \texttt{\#define}s) within the code and is necessary for MPI |
CPP \texttt{\#define}s) within the code and is necessary for MPI |
688 |
builds (see Section \ref{sect:mpi-build}). |
builds (see Section \ref{sect:mpi-build}). |