[M3devel] INSTALL_ROOT and PKG_USE in cm3.cfg

Randy Coleburn rcoleburn at scires.com
Fri Jan 25 00:53:48 CET 2008


Jay:
 
The cm3.cfg that comes with your minimal binary installation on Windows
(NT386) has the following lines:
 
*----------------------------------------
% INSTALL_ROOT = BEGIN_CONFIG
%   "Where should CM3 be installed?"
%     7 %-- user specified install root
% END_CONFIG
 
% INSTALL_ROOT = "c:\\cm3"
 
if not defined("INSTALL_ROOT")
    if not equal ($INSTALLROOT, "")
        INSTALL_ROOT = $INSTALLROOT
    else
        INSTALL_ROOT = (path() & "\\..")
    end
end
 
BIN_INSTALL   = INSTALL_ROOT & "\\bin ( file://\bin )"          %
executables
LIB_INSTALL   = INSTALL_ROOT & "\\lib ( file://\lib )"          %
libraries
PKG_INSTALL   = INSTALL_ROOT & "\\pkg ( file://\pkg )"          %
packages
DOC_INSTALL   = INSTALL_ROOT & "\\doc ( file://\doc )"          %
documents
EMACS_INSTALL = INSTALL_ROOT & "\\elisp ( file://\elisp )"        %
emacs lisp code
MAN_INSTALL   = INSTALL_ROOT & "\\man ( file://\man )"          % man
pages
HTML_INSTALL  = INSTALL_ROOT & "\\www ( file://\www )"          %
public hypertext
 
%
% On some systems (e.g. AFS) you must install public files in a
different
% place from where you use them.  If that is the case for your system,
% specify the "use" location here, otherwise leave them alone.
%
%USE_ROOT  = INSTALL_ROOT
BIN_USE   = BIN_INSTALL   % executables
LIB_USE   = LIB_INSTALL   % libraries
PKG_USE   = PKG_INSTALL   % packages
*----------------------------------------
 
Notice that the lines for INSTALL_ROOT and USE_ROOT are commented out.
 
The Reactor program is coded to grab several variables out of cm3.cfg. 
For example,
 
    build_dir       := M3Config.Get ("BUILD_DIR");
    system_root     := M3Config.Get ("PKG_USE");
    doc_root        := M3Config.Get ("DOC_INSTALL");
    initial_browser := M3Config.Get ("INITIAL_CM3_IDE_BROWSER");
    initial_editor  := M3Config.Get ("INITIAL_CM3_IDE_EDITOR");
What is happening on my installation is that PKG_USE winds up being
"\..\PKG".  This is not a valid path and it is causing all sorts of
trouble for Reactor.
 
The reason it is getting set this way is that the ELSE branch of the,
if not defined("INSTALL_ROOT"), is getting executed resulting in
INSTALL_ROOT=\..
 
I'm not sure why this is coded this way.
 
How do you suggest this should be repaired?  
 
Note, I have not checked all of the cm3.cfg variants for the other
target platforms, but in order for reactor to work properly, it must be
able to find a valid "PKG_USE" in the cm3.cfg.
 
Regards,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080124/7b2c57cd/attachment-0001.html>


More information about the M3devel mailing list