Tiny How To Setup Gela
How to get source from Subversion
Setup subversion and run
svn checkout http://svn.ten15.org/trunk/tendra/ svn checkout http://svn.ten15.org/trunk/contrib/
Ada build prerequirements
You need gnat Ada compiler and xsltproc utility. Beside them you should build bmake, ayacc, aflex tools located in contrib/
- Building bmake: Run make -f Makefile.<your OS>, for instance
cd contrib/make make -f Makefile.Linux
- Building ayacc:
cd contrib/ada/aflex/src gnatmake aflex
- Building ayacc
cd contrib/ada/ayacc/src/ gnatmake ayacc
Copy result utilities into directory pointed by PATH enviroment variable, for instance, /usr/local/bin.
How to build Ada compiler
First run bmake in tendra/:
cd tendra bmake YOU HAVE NOT CONFIGURED TenDRA YET Available targets are: aix cygwin32 darwin freebsd hpux irix linux netbsd openbsd osf1 qnx solaris sunos tru64 In order to configure TenDRA, please execute make with the proper target to create config.mk
Then choise your OS from the list and run bmake once more, like this:
bmake freebsd WITH_ADA=yes
Linux Note: you need to set object files format explicitly (elf or aout)
bmake linux WITH_ADA=yes MACH_EXEC=elf
In this run bmake checks access to needed tools. You can correct pathes to these tools in mk/def/def.<OS>.mk file.
Run building in the same directory (tendra/)
bmake bmake install
Ready to use set TenDRA utils and Ada compiler will be in /usr/local/
Check result
Add /usr/local/bin to your PATH variable:
export PATH=$PATH:/usr/local/bin
Try to compile hello world C program:
cat > hello.c << EOF
#include <stdio.h>
void main ()
{
printf ("Hello world!\n");
}
EOF
tcc hello.c
./a.out
Hello world!
Try to run our small regression test for Ada:
cd tendra/regression bmake
Notes for particular platforms
Gentoo Linux
Files crtbegin.o, crtend.o are not in /usr/lib. They are placed in current gcc directory. To find them use
ls `gcc-config -L`/crt*
and fix 'LIB_CRTBEGIN', 'LIB_CRTEND' variables in tendra/mk/def/def.linux.mk file.
Ubuntu Linux
Default shell dash can't interpret regular expressions like (asis-[^g]*.adb). To change default shell to bash fix symbolic link /bin/sh -> /bin/dash, redirect it to /bin/bash.
Check path to crtbegin.o, crtend.o also.
Debian
Check if you have GNU awk installed, because mawk can't handle with mkerr.awk:
awk: tendra/src/utilities/mkerr/mkerr.awk: line 437: syntax error at or near usage