Unacorn - help port RISC OS programs to Unix

This is a couple of utilities to help port RISC OS C programs to Unix. The only ones that port easily are those written with Unixlib in the first place, of course.

unacorn_files changes the RISC OS directory structure of c.hello, o.hello and so on to the Unix convention of files called hello.c, hello.o, etc.

unacorn_mf attempts to do the same to a RISC OS Makefile, as well as fixing some case-sensitivity problems.

There is one other program you will probably need, whitespace, which changes eight spaces to the tab character required by Unix make.


To port a Unixlib/RISC OS program to Unix, you'll typically do this from the source directory:

% unacorn_files
% whitespace -c Makefile
% unacorn_mf <Makefile >Makefile.new
% mv Makefile.new Makefile

Then edit the Makefile to fix anything that's obviously wrong (arguments to the C compiler, and link on RISC OS can probably be changed to cc on Unix), and try running make. If you're lucky then it might just work, if not then at least some of the tedious work is done.

I wrote this for one program, tr2latex (which was a RISC OS port of a Unix program to start with) and haven't tested any others, so I'd be interested to know how well it works.

I tried to think of a less pejorative name than 'Unacorn' but none of the alternatives were as snappy.


The latest version is 0.1.3. This does a little more munging on the makefile (it changes the contents of variables, handly for things like $(OBJS) which are a list of filenames) and has an 'install' script.


./install --prefix=/usr/local, or whatever.


All the files are in the public domain. This means there are no copyright restrictions, you may do what you wish with them. Of course, giving credit would be appreciated (but not required).

They are offered as-is with no warranty whatsoever.

Author and credits

Please contact me, Ed Avis <ed@membled.com> with any suggestions or bug reports.

These programs have a web page at http://membled.com/work/apps/unacorn/.

Stop software patents in the EU

Edward Avis
Last modified: Sun Dec 1 19:54:46 GMT 2002