xp-framework/rfc — Issue #211: RFC 0211: "build.xml" for xcc
Author: thekid
Created: 2011-10-17 16:10:07+00:00
State: open
Labels: language, technology

Projects containing sourcecode written in XP Language need to compile it to be able to use it. For this sake, a `Makefile` is usually added with targets as follows:

```Makefile
compile:
xcc -o dist/main -sp src/main/xp src/main/xp
xcc -o dist/test -sp src/test/xp src/test/xp
```

The `dist/main` and `dist/test` directories are added to `project.pth` and then used as classpath. The issues with this approach are:

* We are dependent on `make` being installed on a system (OK for Un*x, OS/X, Cygwin, but how about "plain" Windows?)
* The `Makefile` needs to be copy&pasted everywhere, always with the same content. On the other side, we also cannot rely on conventions everywhere, so slight differences arise, as will probably compiler options (like optimizations, ...)

The suggestion would be to add a file to the directory (or maybe a special directory with a set of files inside?) to "control" `xcc` so that a simple `xcc` invocation without arguments would invoke the compiler with the information read from these control files.

Ant / Maven / Phing / MSBuild could be used as inspiration, integrating with compiler profiles which are already supported is also to be considered.