Issue 48781 - Problem with attempted deletion of already-deleted intermediate file
Summary: Problem with attempted deletion of already-deleted intermediate file
Status: CLOSED WONT_FIX
Alias: None
Product: Build Tools
Classification: Code
Component: dmake (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: Unknown
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 17:08 UTC by shay
Modified: 2017-05-20 09:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description shay 2005-05-05 17:08:18 UTC
This is a re-log of a problem first described in issue #43310.

The problem is question is reproduced by the following makefile:

.USESHELL :

all :: foo.dll

foo.dll : foo.obj
	copy foo.obj foo.dll

all :: foo.xs

.c.obj :
	copy $*.c $*.obj

.xs.c :
	copy $*.xs $*.c

foo.xs ::
	echo foo>foo.xs

This almost works OK, but tries to delete foo.xs at the end of the process and
fails because it has already deleted it earlier.  Here's the output that I get:

echo foo>foo.xs
copy foo.xs foo.c
        1 file(s) copied.
del  foo.xs
copy foo.c foo.obj
        1 file(s) copied.
del  foo.c
copy foo.obj foo.dll
        1 file(s) copied.
del  foo.xs
Could Not Find C:\Temp\dmake-43310\foo.xs

If I remove the "all :: foo.xs" line then the extraneous deletion is not
attempted and all is well.

An even stranger thing happens if I changed the "foo.xs ::" line to just "foo.xs
:" instead.  In this case, the extra deletion is again attempted, but this time
succeeds because foo.xs actually gets remade first!  Here's the output:

echo foo>foo.xs
copy foo.xs foo.c
        1 file(s) copied.
del  foo.xs
copy foo.c foo.obj
        1 file(s) copied.
del  foo.c
copy foo.obj foo.dll
        1 file(s) copied.
echo foo>foo.xs
del  foo.xs
Comment 1 quetschke 2005-05-05 18:34:18 UTC
.
Comment 2 Martin Hollmichel 2010-07-20 16:34:00 UTC
no owner.
Comment 3 Pedro Giffuni 2012-10-16 04:33:28 UTC
Dmake was moved to Apache Extras, which doesn't mean anyone cares about it.