icmbuild(1) | Icmake’s generic program maintenance facility | icmbuild(1) |
icmbuild - A generic, C++/C program maintenance facility
icmbuild [-h] [-c] args
Icmbuild is a small C++ program calling icmake(1) to do program maintenance as defined by the icmbuild script (commonly found in /usr/libexec/icmake).
Icmbuild’s actions are tailored through a configuration file (icmconf) which must be present in the directory where program maintenance is requested. This file is automatically installed by icmstart(1). Refer to icmconf(7)’s man-page for details about this file.
Icmbuild assumes that your sources exist in and below the current working directory. The file icmconf in icmake(1)’s distribution provides an example of an icmconf file that can be used by icmbuild. In that example it is assumed that a C++ project is maintained, but program maintenance for, e.g., a C project can also easily be configured. If icmbuild is called, but icmconf is not available it displays a usage-summary after which icmbuild ends.
Icmbuild() handles the maintenance for all sources in each of the subdirectories named in the file CLASSES, and also of all sources in the current working directory. `Maintenance’ involves compiling all as yet uncompiled source files, recompilation of modified source files, optionally library maintenance and optionally constructing a Single Pre-Compiled Header (SPCH) and multi-threaded source file compilation, resulting in a marked reduction of source compilation times.
When source files are compiled object files result which may be stored in a library, against which the object file of the program’s main function is linked. It is also possible to specify additional libraries against which the program must be linked.
If a library is constructed it is kept up to date by icmbuild. When a source is successfully compiled its new object module replaces the old one in the library. At that point the separate object files are no longer required and are removed by icmbuild.
To use icmbuild do as follows:
Next:
The next section covers icmbuild’s modes of operation.
Icmbuild recognizes three options of which only one can be specified. See the following section for information about which option is recognized by which icmbuild command.
Icmbuild recognizes the following commands (possible options are shown between square brackets). With the install commands a path argument must be specified, which must be an existing user-writable directory:
icmbuild install program ~/bin/progThis installs the constructed binary program in the user’s bin directory with the name prog;
icmbuild install static /usr/lib/This installs the constructed static library (assume its name is libspecial.a) in /usr/lib as /usr/lib/libspecial.a.
icmbuild install shared /usr/lib/This installs the constructed binary shared library (e.g. libspecial.so) in /usr/lib as /usr/lib/libspecial.so. In addition, the soft-links
libspecial.so -> libspecial.so.X libspecial.so.X -> libspecial.so.X.Y.Y.Zare defined in /usr/lib, where X.Y.Z are the major, minor and subminor versions defined in the file VERSION.
#define DEFCOM "program"which is quivalent to the command icmbuild [-c] program;
#define DEFCOM "library"then this is quivalent to the command icmbuild [-c] library.
Class dependencies are handled by icmake’s support program icm-dep. It can be called from icmake when specifying option -d. All options and arguments following -d are forwared to icm-dep.
The program icm-dep is automatically called by icmbuild to handle class dependencies. Refer to the icmake(1) manpage, section ICM-DEP for a description of the icm-dep program.
By default icmbuild calls icmake -d -V go: icm_dep is called to perform its duties and to show its actions on the standard output stream. By specifying a #define ICM_DEP parameter in the icmconf file this default can be overruled (cf. icmconf(7)).
The mentioned paths are sugestive only and may be installation dependent:
Here is an example of the configuration file icmconf for a concrete program, using facilities of the bobcat library:
#define CLS #define LIBRARY "ofiles" #define MAIN "main.cc" #define SOURCES "*.cc" #define OBJ_EXT ".o" #define SHAREDREQ "" #define TMP_DIR "tmp" #define USE_ALL "a" #define USE_ECHO ON #define CXX "g++" #define CXXFLAGS "-Wall -Werror -O2" #define IH ".ih" #define MULTICOMP "jobs -q" #define SPCH "" #define REFRESH #define LDFLAGS "" #define ADD_LIBRARIES "bobcat" #define ADD_LIBRARY_PATHS "" #define DEFCOM "program"
icmake(1), icmconf(7), icmstart(1), icmstart.rc(7)
None reported
This is free software, distributed under the terms of the GNU General Public License (GPL).
Frank B. Brokken (f.b.brokken@rug.nl).
1992-2025 | icmake.13.00.03 |