For batch building using a RAM disk for intermediate files, I would like to delete generated

object files as soon as possible. I tried doing the following:

 

all: moduleA.a

 

moduleA_OBJS = moduleA_1.o

 

moduleA.a: $(moduleA_OBJS)

                      ar -rc $@ $(moduleA_OBJS)

                      rm -f $(moduleA_OBJS)

 

moduleA_1.o: moduleA_1.c

                      gcc -c moduleA_1.c -o moduleA_1.o

 

Assume there is a whole lot of modules. This works great when not using multiple jobs.

The object files are generated, the archive is created, the object files are deleted. This

cut down intermediate file storage requirements from ~2.2GB to ~100MB when building

my project. Using multiple jobs however, say 50, make tends to create the object files

for a whole lot of modules, then create the archives for these modules, then delete the

object files for these modules. This causes the disk space requirements to go way up.

Is there any way I can achieve my goal for make –j also?

 

Casper

 

_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to