public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [make] VPATH pb
@ 2000-12-27  8:35 Pascal Davoust
  2000-12-27 12:02 ` `less', not soren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pascal Davoust @ 2000-12-27  8:35 UTC (permalink / raw)
  To: cygwin

Hi,

I'm currently using the latest CygWin distrib (1.1.6) on MS Win2k
Professional, and I'm having a strange behaviour when I use VPATH.
Here's the makefile I want to use (as simple as I can) :
==========================================
SHELL=bash
VPATH=src;bin;lib

%.bin:	%.src
	@echo Building binary...
	cp $< bin/$@

%.lib:	%.bin
	@echo Building library...
	cp $< lib/$@

file.bin:	file.src
file.lib:	file.bin
==========================================
with three different existing directories src, bin and lib. Each will
contain the .src, .bin and .lib file.

When the 'file.bin' and 'file.lib' files don't exist (the first time I run
make), here's what I get :
------------------------------------------
>make file.lib
Building binary...
cp src/file.src bin/file.bin
Building library...
cp file.bin lib/file.lib
cp: file.bin: No such file or directory
make: *** [file.lib] Error 1
------------------------------------------
A second run produces the expected output :
------------------------------------------
Building library...
cp bin/file.bin lib/file.lib
------------------------------------------

The question is : why is the VPATH variable not used when chaining the two
steps ? It looks like VPATH is applied only to the 'file.src' target and not
on the 'file.bin' one...
Could somebody explain that to me ?

I'm not sure whether it's a problem related to my understanding of the make
tool, the GNU implementation, or the CygWin port... I tried the same on a
Unix in my company with dmake (not gmake), and it works like a charm.
Unfortunatly, I don't have access to gmake on this Unix box to compare with
the Win32 port.

BTW, the default make mode is 'unix' (I checked it), so no problem here.

Thanks in advance,


				Pascal Davoust.


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* `less', not
  2000-12-27  8:35 [make] VPATH pb Pascal Davoust
@ 2000-12-27 12:02 ` soren
  2000-12-27 12:21 ` [make] VPATH pb Avraham H. Fraenkel
  2000-12-28  9:06 ` Patrick Doyle
  2 siblings, 0 replies; 4+ messages in thread
From: soren @ 2000-12-27 12:02 UTC (permalink / raw)
  To: cygwin

Hello,

I have the latest of cygwin and am running it (today) on a Win95 
box. When I try to page STDOUT thru `less' I get blank lines only, 
no text printed. Also, I wanted to note that the contrib/perl-5.6.1 (as 
great as it is) segementation faults when running the CPAN.pm 
first-time setup. It happened specifically after loading Net::FTP (I 
think?) and trying to download something (probably a list of CPAN 
multiplexor sites?).

   Best,
    soren andersen, On The Road.



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [make] VPATH pb
  2000-12-27  8:35 [make] VPATH pb Pascal Davoust
  2000-12-27 12:02 ` `less', not soren
@ 2000-12-27 12:21 ` Avraham H. Fraenkel
  2000-12-28  9:06 ` Patrick Doyle
  2 siblings, 0 replies; 4+ messages in thread
From: Avraham H. Fraenkel @ 2000-12-27 12:21 UTC (permalink / raw)
  To: Pascal Davoust; +Cc: cygwin

Hello,
  I found this problem also in GNU make on HP-UX
  (GNU Make version 3.76.1)
  It seems that GNU make find that to build file.lib he needs file.bin
  so he call the rule for it and it assumed that after calling to the rule
  the file is created in currunt dir and there is no need to look for it
  in the VPATH.
  If you found how to solve this problem , I will be glad to know.

  Thanks, 

     Avraham

--------------------------------------
Avraham H. Fraenkel 
email : avraham.fraenkel@comMATCH.com
URL   : www.comMATCH.com
---------------------------------------

On Wed, 27 Dec 2000, Pascal Davoust wrote:

> Hi,
> 
> I'm currently using the latest CygWin distrib (1.1.6) on MS Win2k
> Professional, and I'm having a strange behaviour when I use VPATH.
> Here's the makefile I want to use (as simple as I can) :
> ==========================================
> SHELL=bash
> VPATH=src;bin;lib
> 
> %.bin:	%.src
> 	@echo Building binary...
> 	cp $< bin/$@
> 
> %.lib:	%.bin
> 	@echo Building library...
> 	cp $< lib/$@
> 
> file.bin:	file.src
> file.lib:	file.bin
> ==========================================
> with three different existing directories src, bin and lib. Each will
> contain the .src, .bin and .lib file.
> 
> When the 'file.bin' and 'file.lib' files don't exist (the first time I run
> make), here's what I get :
> ------------------------------------------
> >make file.lib
> Building binary...
> cp src/file.src bin/file.bin
> Building library...
> cp file.bin lib/file.lib
> cp: file.bin: No such file or directory
> make: *** [file.lib] Error 1
> ------------------------------------------
> A second run produces the expected output :
> ------------------------------------------
> Building library...
> cp bin/file.bin lib/file.lib
> ------------------------------------------
> 
> The question is : why is the VPATH variable not used when chaining the two
> steps ? It looks like VPATH is applied only to the 'file.src' target and not
> on the 'file.bin' one...
> Could somebody explain that to me ?
> 
> I'm not sure whether it's a problem related to my understanding of the make
> tool, the GNU implementation, or the CygWin port... I tried the same on a
> Unix in my company with dmake (not gmake), and it works like a charm.
> Unfortunatly, I don't have access to gmake on this Unix box to compare with
> the Win32 port.
> 
> BTW, the default make mode is 'unix' (I checked it), so no problem here.
> 
> Thanks in advance,
> 
> 
> 				Pascal Davoust.
> 
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [make] VPATH pb
  2000-12-27  8:35 [make] VPATH pb Pascal Davoust
  2000-12-27 12:02 ` `less', not soren
  2000-12-27 12:21 ` [make] VPATH pb Avraham H. Fraenkel
@ 2000-12-28  9:06 ` Patrick Doyle
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick Doyle @ 2000-12-28  9:06 UTC (permalink / raw)
  To: Pascal Davoust; +Cc: cygwin

First of all, I offer my congratulations and appreciation for having
distilled your problem to a simple test case.

Unfortunately...

Second of all, this is not a CYGWIN specific problem, as is evidenced by
a followup posting from Avraham H. Fraenkel indicating that the problem
has been seen on HP-UX as well.  (In addition, I have reproduced this
problem on a LINUX -- once I changed the semicolons to colons in the
VPATH statement).  Because of this, you will probably have better luck
posting your question to GNU make mailing list, a general programming
mailing list, etc... instead of to a list dedicated to CYGWIN issues.

I will post a separate reply to you directly explaining what is going on
with your makefile and ways that you might address the issue.  I'm out
of time right now, but I hope to respond in the next few days or so.  As
a hint in the mean time: your makefile lies.  As a debugging tip in the
mean time, try "make -r -R -d file.lib" in order to get volumuous debug
output.

--wpd


Pascal Davoust wrote:
> 
> Hi,
> 
> I'm currently using the latest CygWin distrib (1.1.6) on MS Win2k
> Professional, and I'm having a strange behaviour when I use VPATH.
> Here's the makefile I want to use (as simple as I can) :
> ==========================================
> SHELL=bash
> VPATH=src;bin;lib
> 
> %.bin:  %.src
>         @echo Building binary...
>         cp $< bin/$@
> 
> %.lib:  %.bin
>         @echo Building library...
>         cp $< lib/$@
> 
> file.bin:       file.src
> file.lib:       file.bin
> ==========================================
> with three different existing directories src, bin and lib. Each will
> contain the .src, .bin and .lib file.
> 
> When the 'file.bin' and 'file.lib' files don't exist (the first time I run
> make), here's what I get :
> ------------------------------------------
> >make file.lib
> Building binary...
> cp src/file.src bin/file.bin
> Building library...
> cp file.bin lib/file.lib
> cp: file.bin: No such file or directory
> make: *** [file.lib] Error 1
> ------------------------------------------
> A second run produces the expected output :
> ------------------------------------------
> Building library...
> cp bin/file.bin lib/file.lib
> ------------------------------------------
> 
> The question is : why is the VPATH variable not used when chaining the two
> steps ? It looks like VPATH is applied only to the 'file.src' target and not
> on the 'file.bin' one...
> Could somebody explain that to me ?
> 
> I'm not sure whether it's a problem related to my understanding of the make
> tool, the GNU implementation, or the CygWin port... I tried the same on a
> Unix in my company with dmake (not gmake), and it works like a charm.
> Unfortunatly, I don't have access to gmake on this Unix box to compare with
> the Win32 port.
> 
> BTW, the default make mode is 'unix' (I checked it), so no problem here.
> 
> Thanks in advance,
> 
>                                 Pascal Davoust.
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-12-28  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-27  8:35 [make] VPATH pb Pascal Davoust
2000-12-27 12:02 ` `less', not soren
2000-12-27 12:21 ` [make] VPATH pb Avraham H. Fraenkel
2000-12-28  9:06 ` Patrick Doyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).