X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Tue, 02 Dec 2003 19:46:42 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Manni Heumann Message-Id: <1659-Tue02Dec2003194642+0200-eliz@elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: (message from Manni Heumann on 2 Dec 2003 15:24:36 GMT) Subject: Re: make, environment variables, and export References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Manni Heumann > Newsgroups: comp.os.msdos.djgpp > Date: 2 Dec 2003 15:24:36 GMT > > Here's an example: > > $(TARGET): > export TEST=foo; perl somescript.pl > > before the script runs, I get the error message and the script doesn't > see TEST. What shell is invoked by Make? If that's Windows' CMD, it doesn't know about the `export' comand. So either add "SHELL = /bin/sh" to your Makefile (near its beginning) and then use this command: TEST=foo perl somescript.pl or use the `export' directive of Make, like this: export TEST=foo $(TARGET): perl somescript.pl (Personally, I prefer the second alternative because it doesn't require Bash to be installed on the user machine.) If the above doesn't help, please show a short complete Makefile that can be used to reproduce this problem.