bug-make
[Top][All Lists]
Advanced

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

Re: Intermediate file woes


From: tom_honermann
Subject: Re: Intermediate file woes
Date: Thu, 17 May 2001 17:15:26 -0700

I never got a response on this.  Thought I'd try one more time before
diving into the code.  Anyone gots some comments?

Tom.



                                                                                
                                        
                    address@hidden                                              
                                    
                    lesoft.com                To:     address@hidden            
                                      
                    Sent by:                  cc:                               
                                        
                    address@hidden        Subject:     Intermediate file woes   
                                    
                    .org                                                        
                                        
                                                                                
                                        
                                                                                
                                        
                    05/10/01 11:29 AM                                           
                                        
                                                                                
                                        
                                                                                
                                        




Running GNU Make 3.79.1 on a RedHat Linux 6.2 system

I've got two issues:

1) Explicit intermediate files (Those listed as pre-reqs of .INTERMEDIATE)
will get deleted even if make did not create them.  This is not-consistant
with how make deals with non-explicit intermediate files.  Here's an
example:

   .SUFFIXES:
   #.INTERMEDIATE: test.x

   all: test

   %.x: %.cpp
           cp $< $@

   %.i: %.x
           cp $< $@

   %.o: %.i
           cp $< $@

   clean::
           rm -f test *.o *.i *.x

   test: test.o
           cp $< $@

Running this as is looks like this:
   st-lnx01:$ make clean
   rm -f test *.o *.i *.x *.d
   st-lnx01:$ make
   cp test.cpp test.x
   cp test.x test.i
   cp test.i test.o
   cp test.o test
   rm test.x test.i
   st-lnx01:$ make test.x
   cp test.cpp test.x
   st-lnx01:$ make
   cp test.x test.i
   cp test.i test.o
   cp test.o test
   rm test.i                                     <--- test.x not deleted

Uncommenting ".INTERMEDIATE: test.x" after .SUFFIXES results in this:
   st-lnx01:$ make clean
   rm -f test *.o *.i *.x *.d
   st-lnx01:$ make
   cp test.cpp test.x
   cp test.x test.i
   cp test.i test.o
   cp test.o test
   rm test.x test.i
   st-lnx01:$ make test.x
   cp test.cpp test.x
   st-lnx01:$ make
   cp test.x test.i
   cp test.i test.o
   cp test.o test
   rm test.x test.i                   <--- test.x deleted

Note the last line in each run - test.x is not deleted in the first run,
but it is in the second.

2) The .INTERMEDIATE target doesn't accept patterns for dependencies.  For
example, you can't do this.
   .INTERMEDIATE: %.x

Are these both design restrictions?  Or should I start coding :)

Tom.



_______________________________________________
Bug-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-make









reply via email to

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