Running RTEMS configure script from Eclipse
Chris Welch
cwelch at neumes.com
Thu Nov 24 02:24:33 UTC 2005
The thing is you don't need the .bat interface at all. Forking it off via
bash right from the start gives you a much better way of doing things. Set
up the base script as a bash shell script. You don't need the whole cygwin
environment to do it. Bash gives you a full scripting language even without
supporting commands such as sed, awk, grep, etc. They help, but you don't
have to use them to do basic scripting
E.g.:
Instead of:
build.bat:
@echo off
rem The following sets the paths and environment.
call AutoSetEnv.bat
%1 %2 %3 %4 %5 %6 %7 %8 %9
Set up a bash shell file you'll start as:
c:\cygwin\bash.exe buildit.sh
buildit.sh
# The following set the paths and environment
export PATH="/bin:/usr/bin:... Whatever"
cd /cygdrive/c/projdir
make $1 2>&1 make.out
etc....
Other args are there as $2, $3 etc.
That way you can leverage bash as a scripting environment and get away from
the lame .bat stuff.
.bat technology is over 20 years old. Take advantage of the tools you've
got.
----
Chris Welch, Neumes Consulting, PC and UNIX Solutions
mailto:cwelch at neumes.com (613)797-7831 FAX:(613)838-5602
http://www.neumes.com
-----Original Message-----
From: Chris Johns [mailto:chrisj at rtems.org]
Sent: November 23, 2005 7:12 PM
To: Chris Welch
Cc: rtems-users at rtems.com
Subject: Re: Running RTEMS configure script from Eclipse
Chris Welch wrote:
>
> I've configured bash to pick up my RTEMS environment so that I don't
> have to mess around with setting things up everytime I fire off a
> shell from windows.
>
This is ok for your setup and will suite most users but some people end
up with more than cygwin version on their machine and they often to do
not play well together. The approach I outlined avoids such problems by
not providing the cygwin configuration as a global setup.
> If you do decide to script things, avoid the suggested .bat solutions
> and write a short cygwin shell script. .bat scripting is extremely
> primative and completely unnecessary with cygwin present.
>
The batch files are not provided as a way to script, rather a way to
setup an environment for native Windows programs that do not know how to
execute a shell script or any thing about cygwin to work. I found this
to be important with a MinGW based set of tools.
An all Cygwin environment should allow just scripts to be used, how-ever
I do not use cygwin so cannot say for certain.
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Chris Welch (cwelch at neumes.com).vcf
Type: text/x-vcard
Size: 389 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20051123/b88bb56c/attachment-0001.vcf>
More information about the users
mailing list