Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Setting environment with a script
- A. Farber
March 4, 2005, 8:35 am
rate this thread
I have a question not related to Perl's syntax, but to its usage.
I have a script which generates GNU Makefiles out of a bigger
number of input files. With that script I'd also like to
set environment variables for a build - so that I have one
big all-in-one script.
With Unix that's easy - I'll let the users call my script as
eval `create_makefiles.pl` in sh
eval `create_makefiles.pl -c` in csh
and generate export/setenv commands when called this way.
But what could I do to make it also work on Windows?
(in a DOS-window, not in Cygwin) Does anybody solve this
problem already or knows a module doing similar things?
Re: Setting environment with a script
A. Farber wrote:
> I have a question not related to Perl's syntax, but to its usage.
You've almost partitioned the problem but you've just stopped one step
short. You problem is about the ways processes can interact under
windows - the fact that one or more of the script is in Perl is not
> With Unix that's easy - I'll let the users call my script as
> eval `create_makefiles.pl` in sh
> eval `create_makefiles.pl -c` in csh
> and generate export/setenv commands when called this way.
> But what could I do to make it also work on Windows?
You can have the Perl script create a batch file the call that batch
file. There may be better ways but this is really a question about
Windows not Perl so perhaps you should ask in a Windows newsgroup.
- » Msql-Mysql-modules: unable to find my mySQL 'include' dir
- — Previous thread in » PERL Discussions