make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Batch building and make -j


From: Casper Hornstrup
Subject: Batch building and make -j
Date: Fri, 22 Apr 2005 13:27:46 +0200

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

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]