delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/02/13:30:44

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: make, environment variables, and export
Date: 2 Dec 2003 18:16:25 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 25
Message-ID: <bqiktp$3fv$2@nets3.rz.RWTH-Aachen.DE>
References: <bqiark$21jskd$1 AT ID-54749 DOT news DOT uni-berlin DOT de>
NNTP-Posting-Host: ac3b07.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1070388985 3583 137.226.33.205 (2 Dec 2003 18:16:25 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 2 Dec 2003 18:16:25 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Manni Heumann <manni DOT heumann AT gmx DOT de> wrote:

> Currently my problem is "export". According to the make info files
> and to googled information, make should be able to set an
> environment variable with export and then run another program, even
> when it is run under a dos/windows shell (right?).
[...]
> $(TARGET):
>         export TEST=foo; perl somescript.pl

You're using "export" in the wrong place.  You have in the *command*
section of a rule, where it's entirely at the mercy of the system's
command line processor what happens with it.

You're supposed to do this by placing a line like

TEST = foo

.EXPORT: NAME

in the generic part of makefile, outside any rules.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019