This page describes how you can set up your development environment for PHP-Sat/PHP-Front. Most of the information is located elsewhere, if a link is dead please let us know.
This configuration is the same configuration as the one that I am personally using.
%TOC%
---++ Installing Nix
Information about installing NIX is available [[http://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual][here]].
Note that the manual installation of nix-packages goes more smoothly if you set the [[http://hydra.nixos.org/build/118743/download/1/manual/#id262663][permissions]] in the right way.
---++ Installing Stratego
The simplest way to install everything you need is to use [[http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest][this]] and [[http://hydra.nixos.org/project/strategoxt/channel/latest][this]] nix-channel.
$ nix-channel --add http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest
$ nix-channel --add http://hydra.nixos.org/project/strategoxt/channel/latest
$ nix-channel --update
You can use this command to install all dependencies:
$ nix-env -i aterm-2.5 sdf2-bundle strategoxt strategoxt-utils stratego-shell
Note that the stratego-libraries are not installed, they are for other platforms.
And this one to update everything:
$ nix-channel --update
$ nix-env -u '*'
---++ Installing Autoconf and Libtool
In order to build from source you need to have both the [[http://www.gnu.org/software/autoconf/][Autoconf]] and [[http://www.gnu.org/software/libtool/][libtool]] tools installed. If you do not have a copy of them available, you can either install these from the release page of these tools, or through nix:
$ nix-env -i autoconf libtool
---++ Installing the repositories
_The 'php-*' stands for both 'php-front and php-sat'_
The first thing that has to be done is the correct setting of the PKG_CONFIG_PATH-variable.
$ export PKG_CONFIG_PATH=~/.nix-profile/lib/pkgconfig
When this is not done the configure script will not find the ATerm, SDF or !StrategoXT-files.
The rest of the repository installation is straight-forward, just use the following sequence of commands in the location of
your choice.
(The <repository> is %SVNROOT%)
$ svn checkout /psat/php-*/trunk ./php-*/
$ cd php-*
$ ./bootstrap
$ ./configure --enable-bootstrap
$ make
$ make check
$ make install
This sequence gets the latests source-code, configures (the _--enable-bootstrap_ is required!) and builds, checks and installs everything.
---++ Setting up your editor
There are several editor plug-ins for stratego, you can find them [[http://www.program-transformation.org/Stratego/AdditionalPackageDownload#Editor_Plugins_for_Stratego][here]].
There are also highlighters available for [[http://www.context.cx/][Context]]. There is one for [[http://soc.bouwers.info/SDF.chl][SDF]] and one for [[http://soc.bouwers.info/Testsuite.chl][testsuites]].
---++ Have fun
Your development environment is ready. If you make anything useful please let us know, happy coding!