delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/08/16:30:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 8 Oct 2002 14:30:22 -0600
Message-Id: <200210082030.g98KUMF26088@wolf.cimsoft.com>
From: Robert Mecklenburg <mecklen AT cimsoft DOT com>
To: bug-make AT gnu DOT org
cc: Cygwin Users List <cygwin AT cygwin DOT com>
Subject: Changing resolution of $^ in make

I apologize in advance if this cross-posting is inappropriate, but it
seemed reasonable at the time...


The following makefile yields two different values for $^ when run
twice in succession:

# Example makefile
vpath %.in /c/work/tmp/src
vpath %.out /c/work/tmp/out

default: stuff/foo.out
	# $^

%.out: %.in
	touch /c/work/tmp/out/$@

# end of makefile


When run twice I get:

	63 OSAKA:tmp$ make
	touch /c/work/tmp/out/stuff/foo.out
	# c/foo.out
	64 OSAKA:tmp$ make
	# /c/work/tmp/out/stuff/foo.out

As you can see, the first time (when the prerequisite "stuff/foo.out"
doesn't exist) , $^ is resolved to "stuff/foo.out".  But the second
time, when stuff/foo.out already exists, it is resolved to
"/c/work/tmp/out/stuff/foo.out".  Is this behavior correct?

Environment Specifics:

This is being run on Windows XP with the latest cygwin installation.
I've cc'd that list because there are a lot of sharp people there
familiar with gnu internals.

65 OSAKA:tmp$ make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
	Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make AT gnu DOT org>.

Thanks,
-- 
Robert


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019