Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3AFA9AD3.72AA2D81@inrialpes.fr>
Date: Thu, 10 May 2001 15:42:43 +0200
From: Olivier Fambon <Olivier.Fambon@inrialpes.fr>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: egor duda <cygwin@cygwin.com>
CC: cygwin@cygwin.com
Subject: Re: 'make aux' hangs ?
References: <3AF979D6.CFFFE8CE@inrialpes.fr>
	 <5016127229.20010509212620@logos-m.ru> <3AFA7D2A.83852811@inrialpes.fr>
	 <12883601112.20010510161054@logos-m.ru> <3AFA8874.85299606@inrialpes.fr>
	 <12584843087.20010510163136@logos-m.ru> <3AFA8D72.1862893@inrialpes.fr> <190852746.20010510170258@logos-m.ru>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


> apparently make cannot find Makefile in current directory, so it has
> no reasons to treat 'aux' as phony. so, it checks if there exists such
> file.

Your interpretation seems satisfying. But this hangs *also* if there is
a Makefile, and an aux target declared in it, but without a .PHONY
directive.

I simplified the test case on purpose, but apparently too much.

Ok, ok, apart from reading the cygwin FAQ, I should probably take some
extra courses in computer science, and go 'info make' from time to time.
All this I did.


The correct Makefile should say:

aux:
	@echo Making aux

.PHONY: aux

This works fine (and is 'clean' make compliant etc etc).

Declaring aux as a phony avoids the call to stat (which seems natural
;), and thus prevents cygwin from hanging on it.


Again, this worked *before*. You tell me it does not any longer. Fine.
This is just yet another system discrepancy. Too bad, I'll live with it.

For the record, I straced the same [simple] test case on a linux, here
is the trace (notice how its readable):

stat("RCS", 0xbfffe30c)                 = -1 ENOENT (No such file or
directory)
stat("SCCS", 0xbfffe30c)                = -1 ENOENT (No such file or
directory)
stat("GNUmakefile", 0xbfffe30c)         = -1 ENOENT (No such file or
directory)
stat("makefile", 0xbfffe30c)            = -1 ENOENT (No such file or
directory)
stat("Makefile", 0xbfffe30c)            = -1 ENOENT (No such file or
directory)
brk(0x806f000)                          = 0x806f000
stat("aux", 0xbfffe274)                 = -1 ENOENT (No such file or
directory)
write(2, "make: *** ", 10make: *** )              = 10
write(2, "No rule to make target `aux\'", 28No rule to make target
`aux') = 28
write(2, ".  Stop.\n", 9.  Stop.
)               = 9
chdir("/users/fambon")                  = 0
_exit(2)                                = ?

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

