bug-make
[Top][All Lists]
Advanced

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

[bug #21771] make 3.81 is deleting intermediate files in a wrong way


From: Rajasekhar
Subject: [bug #21771] make 3.81 is deleting intermediate files in a wrong way
Date: Tue, 11 Dec 2007 05:44:50 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

URL:
  <http://savannah.gnu.org/bugs/?21771>

                 Summary: make 3.81 is deleting intermediate files in a wrong
way
                 Project: make
            Submitted by: rathreya
            Submitted on: Tuesday 12/11/2007 at 05:44
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 3.81
        Operating System: POSIX-Based
           Fixed Release: None

    _______________________________________________________

Details:

bash-3.00$ cat makefile

-include abc.def
-include abc.dep

%.do : 
        echo "$@: $^"
        /bin/rm -f $*.dep $*.def

%.dep : %.def
        echo "$*.do : $(DEF)" > $@

%.def :
        echo "DEF := $*" > $@


makefile : ;
abc : ;
===========================================

Here's the o/p when we run with make 3.80

bash-3.00$ /sw/packages/make/3.80/bin/make abc.do 
echo "DEF := abc" > abc.def 
echo "abc.do : " > abc.dep 
echo "abc.do: "
abc.do: 
/bin/rm -f abc.dep abc.def

===========================================



When we run with 3.81

bash-3.00$ /sw/packages/make/3.81/bin/make abc.do 
echo "DEF := abc" > abc.def 
echo "abc.do : " > abc.dep 
echo "DEF := abc" > abc.def 
echo "DEF := abc" > abc.def 
echo "DEF := abc" > abc.def 

....
....
....


===========================================

AFAIK the issue here is make 3.81 is considering the .def file as
intermediate file and deleting it after producing the .dep file so every time
when it is re-reading the include statements it is not able to find the .def
file and it is going into infinite loop. 

when we add:

.SECONDARY : abc.def

or

.SECONDARY:

then make-3.81 does not delete abc.def (as part of cleaning up the
intermediate files).



One more thing of interest here is if we change the order of includes to

-include abc.dep
-include abc.def

Then make 3.81 works fine !!.







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?21771>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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