From the the "toplevel" directory focalize, one targets "all"
(got via make
). The Makefile
is in charge of running the configuration script, build and install for
all the components of the FoCaLiZe package, i.e. zvtov and focalizec, including
documentation.
Before the building phase can really start, each component of the
FoCaLiZe package are configured, in addition to a "toplevel", general
configuration. Configurations are performed by invocation of a configure
focalize then in zvtov.
Two builtin and hand-written configuration files exist: Makefile.rules and Makefile.utils that are included in the Makefile.common file. This latter also includes the "toplevel" .config_var and is the common primitive configuration to include in further Makefiles. The file Makefile.rules contains the default rules make must apply to build targets from prerequisites. The file Makefile.utils contains the basic commands (cd, make, latex ...) used during the building phase. This latter should not be often modified since these commands are either available and have a well-established name, or simply not available.
The configure
shell scripts perform various validity
checks, commands searches then record all the configuration variables
into files named .config_var
.
The building phase must compile zvtov, the FoCaLiZe compiler
(focalizec
) and its associated dependency checker
(focalizedep
). The necessary building sequence is as follows:
# Go to the FoCaLiZe sources directory
cd ~/src/focalize
# Create a distribution sub directory to check out the distribution branch.
mkdir distribution
cd distribution
# Checkout a fresh distribution branch.
# (Change the name "myname" by your own login name on the server sosie.inria.fr)
git clone myname@sosie.inria.fr:/home/git/focalize.git
# Configure the FoCaLiZe, compile and install it
cd focalize
make all
Compilation from the focalize/focalizec directory is automatic in FoCaLiZe. The Makefile in this directory contains lists of sub-directories that are visited to perform the necessary tasks.
COMPILER_DIRS describes
directories involved in the compiler itself.
LIB_DIRS describes
directories involved the libraries.
DOC_DIRS describes
directories involved the documentation.
ALL_DIRS is the union of
all the previous.
#!/bin/sh
#**********************************************************************#
# #
# FoCaLiZe compiler #
...
ROOT_DIR=..
include $(ROOT_DIR)/Makefile.common
COMPILER_DIRS=\
src/basement src/parser src/typing\
src/docgen src/commoncodegen src/mlcodegen src/coqcodegen\
src/testing src/relation_extraction\
src/toplevel src/focalizedep src/focalizetest src/focalizeig
LIB_DIRS=\
src/stdlib src/extlib src/contribs
DOC_DIRS=\
doc_src
ALL_DIRS=\
$(COMPILER_DIRS) $(LIB_DIRS) $(DOC_DIRS)
...
You must add the new directory in the list(s) at its proper place in the list. Note also, that you must also add all the sub directories of the new directory if any.
You also must add the files names (full path from the root,
including the $ROOT_DIR/
directory -- usually focalize/) to the list of files to include in a distribution if you
intend to have your files belonging to the standard distribution of
FoCaLiZe. Add files names to the file $ROOT_DIR/files-for-distrib.lst.
When a release is to be completed, and
preferably before branching, you must
consolidate the version number of every component of FoCaLiZe.
For the entire FoCaLiZe system, it means to edit and verify the following files:
$ROOT_DIR
/focalizec/src/basement/configuration.ml
(the version for FoCaLiZe is in this file). $
ROOT_DIR/
zvtov/version.ml
(the version for zvtov is in this file
). The Release documentation has to be recompiled with the new version numbers. You need to:
$ROOT_DIR/focalizec/doc_src/man/*.1
(change the
version). $ROOT_DIR/focalizec/doc_src/tex/refman/macros.tex
(change the definitions \def\month{mm}
\def\year{yy}
\def\focalversion{\sf vv}
). $ROOT_DIR/focalizec/doc_src/tex/refman/macros.hva
(change the definitions \def\month{mm}
\def\year{yy}
\def\focalversion{\sf vv}
). $ROOT_DIR/focalizec/doc_src/tex/tutorial/macros.tex
(change the definitions \def\month{mm}
\def\year{yy}
\def\focalversion{\sf vv}
).$ROOT_DIR/doc_src/Includes/project.env
(change the definition version_number_full).Finally, the Makefile creating the distribution must be updated with the version number: focalize/Makefile. In the Makefile entry distrib:
The list of all the files to include in the distribution is $ROOT_DIR/files-for-distrib.lst.
Then, from $ROOT_DIR
, invoke make distrib. The resulting archive will be located in $ROOT_DIR/focalize-current.version.number.tgz
.