makeme



What is makeme?

makeme is a build tool written in Java freely available under the GPL.

I created makeme for the kissme Java Virtual Machine.

I needed a make tool that would easily accomodate a project with many subdirectories. Make does not do this. Instead makeme requires a much simpler makefile, called .makeme . Here is an example of the rule used to build makeme itself:

BuildRule b1 = "jikes -classpath /home/jewel/kissme_classpath/:/home/jewel/java:/home/jewel/java/kopi/temp @full_path_source@"
;

You can see we have a defined a buildrule, this tells make to use the buildrule whenever it encounters a source file (either a .java or .c file) that needs to be built.

We have used a variable: @full_path_source@ which is simply the full path to the source file being built.

Recursing to more directories

But the main reason I needed makeme was because I keep my code in many subdirectories, here is an example of a .makeme file which instructs makeme to recurse into certain subdirs:

Subdir sident1 = "java.lang"
Subdir sident2 = "java.lang.reflect"
Subdir sident3 = "java.util"
Subdir sident4 = "jos.system"
Subdir sident5 = "plava"
Subdir sident6 = "gnu.vm.stack.kludge"
Subdir sident7 = "java.io"
;

Now in the java.lang dir we have a whole lot of .c files to be built. But there is no makefile for this directory, instead it inherits a buildrule from the .makeme files found higher up the tree. In this case the build rule was declared at the toplevel:

BuildRule b1 = "gcc -Wall -c -g -O0 -I. -Ivm  -I@curdir@ @full_path_source@ -o @full_path_target@ "

Here we can see the directives -I. and -Ivm . These imply that the compiler is always run at the level of the top-level directory and everything is relative to that directory. @curdir@ gives us the current subdirectory. @full_path_target@ is necessary because we are compiling from the top-level directory.

Download

Look at the file releases on the project page.

Building and using

I used a hacked version of antlr to build and use makeme. You'll have to install it and see if it works for you.

Future development

Since creating makeme I have discovered the ant tool, which is very cool. But it doesn't seem to cater for invoking a C compiler, and I haven't investigated how it deals with subdirectories.

Until there is a suitable replacement I will continue developing makeme for the purposes of building kissme.

John Leuner - jewel.removeforspam@pixie.co.za
26 July 2000



This project is hosted by SourceForge