delorie.com/archives/browse.cgi | search |
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" <eliz AT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | Manni Heumann <manni DOT heumann AT gmx DOT de> |
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: | <bqiark$21jskd$1@ID-54749.news.uni-berlin.de> (message from Manni |
Heumann on 2 Dec 2003 15:24:36 GMT) | |
Subject: | Re: make, environment variables, and export |
References: | <bqiark$21jskd$1 AT ID-54749 DOT news DOT uni-berlin DOT de> |
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 |
> From: Manni Heumann <manni DOT heumann AT gmx DOT de> > 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |