public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Using cygwin "make"
       [not found] <200101171240.f0HCe1001909@dymwsm10.mailwatch.com>
@ 2001-01-17  5:29 ` John Melody
  0 siblings, 0 replies; 6+ messages in thread
From: John Melody @ 2001-01-17  5:29 UTC (permalink / raw)
  To: Fleischer, Karsten (K.); +Cc: cygwin

Karsten, 

I have tried both and neither works. 

It never seems to execute the cd correctly.

With the following definitions 
CLASSES=D:\classes 

The command
 
D:\work>make --win32 -f d:\work\squash02\Makefile jar 
gives me the following output 
cd D:\classes ; jar -cvf d:\cm-build\checkmate-0.7.0\lib\classes.jar squ/
The filename,directory name or volume label syntax is incorrect 
make ***[jar] Error 1 
D:\work>

All the directories do exist but I just can't see what is wrong. 
Any help would be greatly appreciated. 

Regards, 
John. 

-----Original Message-----
From: Fleischer, Karsten (K.) [ mailto:kfleisc1@ford.com ]
Sent: 17 January 2001 12:40
To: 'John Melody'; cygwin@cygwin.com
Subject: RE: Using cygwin "make"


Hi John,

> I notice that the cd command does not work within the make 
> file. I have
> tried d:\classes, and d:/classes but to no avail.

Every single command line of the rule will be executed in its own shell
process, thus you end up in the original current dir in the second
statement.

You can put the commands on a single line, seperated by a semicolon:

	cd $(CLASSES); jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/

Or you can use line continuation:

	cd $(CLASSES);                                    \
	jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/


Karsten

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

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

* Re: Using cygwin "make"
  2001-01-17  6:16 Bernard Dautrevaux
@ 2001-01-17  6:23 ` Christopher Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2001-01-17  6:23 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 17, 2001 at 02:44:01PM +0100, Bernard Dautrevaux wrote:
>> I have tried both and neither works. 
>> 
>> It never seems to execute the cd correctly.
>> 
>> With the following definitions 
>> CLASSES=D:\classes 
>> 
>> The command
>>  
>> D:\work>make --win32 -f d:\work\squash02\Makefile jar 
>> gives me the following output 
>> cd D:\classes ; jar -cvf 
>> d:\cm-build\checkmate-0.7.0\lib\classes.jar squ/
>> The filename,directory name or volume label syntax is incorrect 
>> make ***[jar] Error 1 
>> D:\work>
>> 
>> All the directories do exist but I just can't see what is wrong. 
>> Any help would be greatly appreciated. 
>
>
>Don't forget that make is using "sh" to execute the command, so the '\' is
>eaten by the shell. You sould use "CLASSES=D:\\classes",
>"CLASSES=D:/classes" or even better (as the colon may fool up make if
>$(CLASSES) is used somewhere in a dependency list)
>"CLASSES=/cygdrive/D/classes".

Remeber, he's using "make --win32", so /bin/sh doesn't enter into this.

If I try an equivalent makefile using "ls" instead of "jar", "ls" shows
the files in the directory that has been cd'ed to, so it seems like
make is working ok, so I can't explain this behavior.

cgf

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

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

* RE: Using cygwin "make"
@ 2001-01-17  6:16 Bernard Dautrevaux
  2001-01-17  6:23 ` Christopher Faylor
  0 siblings, 1 reply; 6+ messages in thread
From: Bernard Dautrevaux @ 2001-01-17  6:16 UTC (permalink / raw)
  To: 'John Melody', Fleischer, Karsten (K.); +Cc: cygwin

> -----Original Message-----
> From: John Melody [ mailto:john@sybernet.ie ]
> Sent: Wednesday, January 17, 2001 2:10 PM
> To: Fleischer, Karsten (K.)
> Cc: cygwin@cygwin.com
> Subject: RE: Using cygwin "make"
> 
> 
> 
> Karsten, 
> 
> I have tried both and neither works. 
> 
> It never seems to execute the cd correctly.
> 
> With the following definitions 
> CLASSES=D:\classes 
> 
> The command
>  
> D:\work>make --win32 -f d:\work\squash02\Makefile jar 
> gives me the following output 
> cd D:\classes ; jar -cvf 
> d:\cm-build\checkmate-0.7.0\lib\classes.jar squ/
> The filename,directory name or volume label syntax is incorrect 
> make ***[jar] Error 1 
> D:\work>
> 
> All the directories do exist but I just can't see what is wrong. 
> Any help would be greatly appreciated. 


Don't forget that make is using "sh" to execute the command, so the '\' is
eaten by the shell. You sould use "CLASSES=D:\\classes",
"CLASSES=D:/classes" or even better (as the colon may fool up make if
$(CLASSES) is used somewhere in a dependency list)
"CLASSES=/cygdrive/D/classes".

HTH

	Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

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

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

* RE: Using cygwin "make"
@ 2001-01-17  5:42 Fleischer, Karsten (K.)
  0 siblings, 0 replies; 6+ messages in thread
From: Fleischer, Karsten (K.) @ 2001-01-17  5:42 UTC (permalink / raw)
  To: 'John Melody'; +Cc: cygwin

John,

you should use cygwin path syntax rather than windows syntax, i.e.
/cygwin/d/classes instead of D:\classes (see cygwin documentation/FAQ)

You can use windows pathes, but you have to remember to quote the
backslashes: replace the single backslashes with double backslashes.
This is a shell issue. Try  'man bash', see chapter 'Quoting'.

Karsten


> -----Original Message-----
> From: John Melody [ mailto:john@sybernet.ie ]
> Sent: Mittwoch, 17. Januar 2001 13:10
> To: Fleischer, Karsten (K.)
> Cc: cygwin@cygwin.com
> Subject: RE: Using cygwin "make"
> 
> 
> 
> Karsten, 
> 
> I have tried both and neither works. 
> 
> It never seems to execute the cd correctly.
> 
> With the following definitions 
> CLASSES=D:\classes 
> 
> The command
>  
> D:\work>make --win32 -f d:\work\squash02\Makefile jar 
> gives me the following output 
> cd D:\classes ; jar -cvf 
> d:\cm-build\checkmate-0.7.0\lib\classes.jar squ/
> The filename,directory name or volume label syntax is incorrect 
> make ***[jar] Error 1 
> D:\work>
> 
> All the directories do exist but I just can't see what is wrong. 
> Any help would be greatly appreciated. 
> 
> Regards, 
> John. 
> 
> -----Original Message-----
> From: Fleischer, Karsten (K.) [ mailto:kfleisc1@ford.com ]
> Sent: 17 January 2001 12:40
> To: 'John Melody'; cygwin@cygwin.com
> Subject: RE: Using cygwin "make"
> 
> 
> Hi John,
> 
> > I notice that the cd command does not work within the make 
> > file. I have
> > tried d:\classes, and d:/classes but to no avail.
> 
> Every single command line of the rule will be executed in its 
> own shell
> process, thus you end up in the original current dir in the second
> statement.
> 
> You can put the commands on a single line, seperated by a semicolon:
> 
> 	cd $(CLASSES); jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/
> 
> Or you can use line continuation:
> 
> 	cd $(CLASSES);                                    \
> 	jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/
> 
> 
> Karsten
> 


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

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

* RE: Using cygwin "make"
@ 2001-01-17  4:40 Fleischer, Karsten (K.)
  0 siblings, 0 replies; 6+ messages in thread
From: Fleischer, Karsten (K.) @ 2001-01-17  4:40 UTC (permalink / raw)
  To: 'John Melody', cygwin

Hi John,

> I notice that the cd command does not work within the make 
> file. I have
> tried d:\classes, and d:/classes but to no avail.

Every single command line of the rule will be executed in its own shell
process, thus you end up in the original current dir in the second
statement.

You can put the commands on a single line, seperated by a semicolon:

	cd $(CLASSES); jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/

Or you can use line continuation:

	cd $(CLASSES);                                    \
	jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/


Karsten


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

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

* Using cygwin "make"
@ 2001-01-17  4:27 John Melody
  0 siblings, 0 replies; 6+ messages in thread
From: John Melody @ 2001-01-17  4:27 UTC (permalink / raw)
  To: cygwin

Hi,

I am not sure if this is the right mailing list but I have a technical
question on using cygwin make.

Is it possible to have something like the following ..

CLASSES=d:/CLASSES
jar:
	cd $(CLASSES)
	jar -cvf $(DISTRIBUTION_DIR)\lib\classes.jar squ/

I notice that the cd command does not work within the make file. I have
tried d:\classes, and d:/classes but to no avail.

Any help would be gratefully appreciated.

Regards,
John.


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

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

end of thread, other threads:[~2001-01-17  6:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200101171240.f0HCe1001909@dymwsm10.mailwatch.com>
2001-01-17  5:29 ` Using cygwin "make" John Melody
2001-01-17  6:16 Bernard Dautrevaux
2001-01-17  6:23 ` Christopher Faylor
  -- strict thread matches above, loose matches on Subject: below --
2001-01-17  5:42 Fleischer, Karsten (K.)
2001-01-17  4:40 Fleischer, Karsten (K.)
2001-01-17  4:27 John Melody

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).