builtin shell commands in a Makefile

Thierry Parmentelat thierry.parmentelat@ixi.fr
Fri Jan 9 01:48:00 GMT 1998

I am pretty new to this project, so please apologize 
if this question was already answered to. Apparently it was not, 
but I may have missed it in the mail archives.

First of all, I would like to thank all the contributors of this
package, that sounds just great to me.

I am using a dual-boot PC (win95 and winnt-4.0 WorkStation).

I created a shared partition on a samba box, say \\samba\nt95\
In this zone I installed
	*) usertools-b18
	*) make-3.76 compiled from the prep.ai.mit.edu distribution
	   with VC++

I also checked that
	*) c:/tmp exists and is 777 (although ls -l shows 755)
	*) c:/bin/sh.exe is a copy of your bash distribution
	*) . appears in my PATH, as well as \\samba\nt95\bin

Most of the Makefiles that I wrote (under Unix, modulo a few variable
definitions) work quite alright under windows, too.

I run into problems when I try to run shell buitlin commands through make.


Here is a sample Makefile
	cat /tmp/a
	if [ -f /tmp/a ]; then echo FOUND /tmp/a; else echo /tmp/a not found; fi

I created an empty /tmp/a file, and under Windows95, I get:

bash$ make debug1
cat /tmp/a

This is fine, but 
bash$ make debug2
if [ -f /tmp/a ]; then echo FOUND /tmp/a; else echo /tmp/a not found; fi
Erreur de syntaxe

If I run the same command directly under sh, it works OK
bash $ if [ -f /tmp/a ]; then echo FOUND /tmp/a; else echo /tmp/a not found; fi
FOUND /tmp/a

I get the same symptom under NT, except the error message goes like this
-f était inattendu (in english, -f was unexpected)

*) Is there any obvious thing I did wrong within this environment ?

*) Or is there anything wrong in my environment ? 
   For instance, should I use another make ?

Thanks to anybody who would care to give me any hint in this matter.

By the way, I also have trouble when I want to insert special characters
under bash. I have a french keyboard. For instance, [ is obtained by
AltGr-5 under MS-dos command.com. Under bash, this sequence does not work,
and the only trick I found is to quote with a Ctrl-V (I use tcsh under Unix)
prior to the keystroke, and then I have to delete an Escape (^[)...
All this is quite tedious, is there any better trick ?

thanks again

For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list