Mail Archives: djgpp/2002/06/17/21:00:20
Hans-Bernhard Broeker wrote:
>
> Stratis Aftousmis <lsdguru78 AT hotmail DOT com> wrote:
> > Hello all, first question i have i think alot of people have asked before
> > but i have yet to find an answer. Can i set up environment variable's for my
> > input and output directories? Yes i did RTFM on enviorment variable's but i
> > saw nothing on what i want to do. Below is an example, everything between %
> > and % is an environment variable:
>
> > c:\djgpp\bin>gcc %input% -o %output%
>
> You can set up environment variables to you heart's content. But that's
> not the real issue. That would be how you can make the tools *use* the
> values of those variables.
>
> At this point, one rather stupid limitation of raw DOS would bite you:
> it doesn't expand environment variables at all in interactive use. I.e.
> if you typed these commands at the command.com prompt
>
> set INPUT=d:\some\strange\place
> set OUTPUT=E:\an\even\stranger\location
> gcc %INPUT%/foo.c -o %OUTPUT%/foo.o
>
> gcc would _not_ refer to file d:\some\strange\place\foo.c, because
> %INPUT% didn't get replaced by the value of that variable.
> COMMAND.COM in raw DOS only does that while running .bat files.
If you're willing to try another command line editor, CmdEdit can do
this, as well as filename completion, brace expansion and associations:
http://cmdedit.adoxa.cjb.net/
Jason.
- Raw text -