XMake INSTALL

XMake version: 0.93a
Release Date: 08/17/05
Copyright (c) 2003 Gregory Keranen. All rights reserved.

Contents

System Requirements Install Gnu Make Install XMake Software Required by XMExtensions

System Requirements

See SYSTEM.html

Install Gnu Make

+ Download GNU Make version 3.80 sources, PATCHED version A patched version is REQUIRED, due to bugs #1516 and #1517 in the official 3.80 release The latest 3.81 beta version is available from: ftp://alpha.gnu.org/gnu/make/ The 3.81 official release will eventually be available from: http://ftp.gnu.org/pub/gnu/make/ + Un-tar, compile and install make-3.8x.tar.gz, per instructions. By default, `make install' will install in `/usr/local/bin/make' If you are installing as a non-root user you need to specify a writable install directory. In brief: cd make-3.8x ./configure # or, ./configure --prefix=$HOME make make install If you install make to a path other than '/usr/local/bin/make', you will need to edit $XMAKE_HOME/config/XMake.conf to assign the default value: export XMAKE_BUILD_CMD=/path/to/your/make - For help with Gnu Make, go to: http://savannah.gnu.org/mail/?group=make

Install XMake

+ Download the latest version of XMake from http://www.xmake.org For this example, assume the name of the downloaded file is xmake-version.tar.gz + Copy xmake-version.tar.gz to $HOME (or any directory that you can write to) xmake-version.tar.gz will decompress into directory 'xmake' + Execute the following commands: tar -xzvf xmake-version.tar.gz cd xmake + Add XMAKE_HOME to your environment (REQUIRED) + Add $XMAKE_HOME/bin to your $PATH (OPTIONAL) If you have installed to $HOME/xmake, then execute the commands: export XMAKE_HOME=${HOME}/xmake PATH=${PATH}:${XMAKE_HOME}/bin Or you can edit your shell config file, E.g., if your shell is bash: echo 'export XMAKE_HOME=${HOME}/xmake' >> ${HOME}/.bash_profile echo '$PATH=${PATH}:${XMAKE_HOME}/bin' >> ${HOME}/.bash_profile + Edit the global project config file: $XMAKE_HOME/config/Project/XMake.conf Set paths to executables and enabled XMExtensions; defaults are: XMAKE_SHELL_CMD=/usr/local/bin/bash XMAKE_BUILD_CMD=/usr/local/bin/make XMAKE_EXTENSIONS='c xdir' + IF: you have bash installed somewhere other than /usr/local/bin/bash: + make a link from /usr/local/bin/bash to your installed bash OR: + edit the first line of file: $XMAKE_HOME/bin/xmakecmd + OPTIONAL: for convenience, you can add to .bashrc (or equiv): alias curdir='pwd -P' This allows building target files in the current directory without typing a full path: xmake $(curdir)/myfile + OPTIONAL: test the installation cd $(XMAKE_HOME)/test xmakep xmake Now you are ready to create and configure an XMake project ( See USAGE.html ), or you can continue to install additional software for XMExtensions, described below.

Security Issues

It is important to bear in mind that many files within an XMake project contain commands which are EXECUTED, at build time. Write access to XMake project directories should be carefully guarded. XMake should never be run as root, unless root has exclusive write access to the project directory and to $(XMAKE_HOME), as well as to external XMake project directories, if XMAKE_RECURSION=1. By default, the following option is set in XMake.conf: XMAKE_AUTODETECT_SOURCE_FILES=1 # auto-detection enabled Source file auto-detection is the most efficient mode of operation, since it requires less maintenance of makefiles. When XMAKE_AUTODETECT_SOURCE_FILES is enabled, XMake does the following: + automatically detects all source files for each enabled XMExtension + adds the corresponding output files to $(XM_outfiles), according to the mapping defined by each XMExtension The default rule (command: 'xmake') builds all output files in $(XM_outfiles), regardless of whether or not XMAKE_AUTODETECT_SOURCE_FILES is enabled. Depending on which XMExtensions are enabled, and how they process source files, this may present a security risk: if source files contain commands to be executed by xmake, enabling XMAKE_AUTODETECT_SOURCE_FILES assumes that all source files can be TRUSTED. In the case of the 'c' XMExtension, this is not an issue since .c source files are only compiled and do not contain commands to execute at build time. In the case of the 'phpc' XMExtension, however, .phpc files contain commands to be executed by PHP to produce output. Simply disabling XMAKE_AUTODETECT_SOURCE_FILES offers no security against attack: malicious commands could just as easily be inserted directly into XMake.conf, or any makefiles, as well as into source files. Disabling XMAKE_AUTODETECT_SOURCE_FILES may be useful to provide a level of administrative control in cases where write access to XMake project directories is shared by a group of developers and malicious attack is not an issue. In this case, source must manually be added to the special makefile: 'XM_sources.mkhs'.

Software Required by XMExtensions

See: USAGE.html