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

Tom.



                                                                                       
                                 
                    tom_honermann@peop                                                 
                                 
                    lesoft.com                To:     [EMAIL PROTECTED]                 
                                 
                    Sent by:                  cc:                                      
                                 
                    bug-make-admin@gnu        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
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make







_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to