make-alpha
[Top][All Lists]
Advanced

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

Re: GNU Make enhansment patch - batching compiles


From: Eli Zaretskii
Subject: Re: GNU Make enhansment patch - batching compiles
Date: Thu, 3 May 2001 19:31:29 +0300 (IDT)

On Thu, 3 May 2001, Paul D. Smith wrote:

> I think you could get a "poor man's" version of this by doing something
> like this:
> 
>   BATCHFILE = /tmp/batch
> 
>   _dummy := $(shell rm -f $(BATCHFILE))
> 
>   %.class : %.java
>           @echo $< >> $(BATCHFILE)
> 
>   CompList1: $(OBJECTS)
>           if [ -s $(BATCHFILE) ]; then; \
>             echo compiling ${CompList1} into outputs; \
>           else \
>             echo nothing to be done; \
>           fi

I thought about this, but with a twist: the "%.class : %.java" rules add 
file names to a file which will eventually look like this:

   FILES_TO_COMPILE = \
   foo.java \
   bar.java \
   baz.java \

and then in the Makefile you say

   include files_list

   all:
        compile -c $(FILES_TO_COMPILE)

Doesn't this do what is needed?



reply via email to

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