develooper Front page | perl.perl5.porters | Postings from June 2004

Re: Smoke [5.9.2] 22881 FAIL(M) MSWin32 WinXP/.Net SP1 (x86/1 cpu)

Thread Previous | Thread Next
From:
Steve Hay
Date:
June 4, 2004 04:28
Subject:
Re: Smoke [5.9.2] 22881 FAIL(M) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
Message ID:
40C05D77.7030109@uk.radan.com
Nick Ing-Simmons wrote:

>Steve Hay <steve.hay@uk.radan.com> writes:
>  
>
>>>This is another of those historical things. When there are no dependancies 
>>>some makes run the rule. Easiest fix is not to lie to make - it must depend 
>>>on something 
>>>
>>>      
>>>
>>OK, that might explain why running "dmake ..\one.txt" always runs the 
>>rule (the ..\one.txt target has no dependencies, so the rule is always 
>>run).  But it doesn't explain why running "dmake all" re-creates 
>>..\one.txt every time: the 'all' target does have a dependency (namely, 
>>..\one.txt), and that is up-to-date, so I wouldn't expect that 
>>dependency to be made.
>>    
>>
>
>But make applies its up-to-date-ness rules recursively.
>
Oops!  Yes, of course.

>So it finds it can make one.txt and so applies its rules to that
>it has no dependancies so _this_ make rebuilds it.
>
>  
>
>>>(even if as in the pseudo example it is Makefile itself and 
>>>cmd.exe or whatever does echo.
>>>
>>>In the UNIDATAFILES case then presumably they depend on mktables 
>>>and possibly $(MINIPERL)
>>>
>>>      
>>>
>>The pseudo target (which I called make_unidatafiles) does already depend 
>>on ..\lib\unicore\mktables and $(MINIPERL) (and $(CONFIGPM) as well), so 
>>I'm still confused what's going on here.
>>
>>I'm now wodering if it is something to do with relative paths.  
>>    
>>
>
>Ah - do the paths have '/' or '\' in them?
>Try the other ...
>
The only slash in the example makefile is the '\' in '..\one.txt':

FILE = ..\one.txt
all : $(FILE)
$(FILE) : makefile.mk
    cd .. && cd && echo One>one.txt

I tried changing it to '/', but running "dmake all" still re-runs the 
rule for $(FILE) every time.

>
>Another possibility is that dmake's 'cd' isn't where it should be 
>for it to find the relative file.
>
I tried changing the rule to output the current directory (which a plain 
"cd" (no arguments) does), and it has cd'd to the right place:

FILE = ..\one.txt
all : $(FILE)
$(FILE) : makefile.mk
    cd .. && cd && echo One>one.txt

C:\Temp>dmake
cd .. && cd && echo One>one.txt
C:\

I also tried an absolute path for the $(FILE), and got a very odd result:

FILE = C:\one.txt
all : $(FILE)
$(FILE) : makefile.mk
    cd .. && cd && echo One>one.txt

C:\Temp>dmake
dmake.exe:  Error -- `C:\one.txt' not found, and can't be made

(Changing '\' to '/' there doesn't help either.)  What on earth happened 
there?!

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About