On 2006-12-01 23:11+0100 Werner Smekal wrote: > Hi Alan, > >> find_program(SH_EXECUTABLE bash) >> >> works. If the name of the program is actually win-bash rather than bash in >> your case you should use the following logic instead: >> >> find_program(SH_EXECUTABLE bash) >> find_program(SH_EXECUTABLE win-bash) >> >> The first one works on Unix, and the second one may be necessary on windows >> where win-bash is installed, but I am not sure. > > I made some changes, but before I cvs it, I want your comment on this: I > added as you wrote the win-bash line > > find_program(SH_EXECUTABLE bash) > find_program(SH_EXECUTABLE win-bash) > if(SH_EXECUTABLE) > set(HAVE_BASH ON) > else(SH_EXECUTABLE) > find_program(SH_EXECUTABLE sh) > endif(SH_EXECUTABLE) > > Important here is, that SH_EXECUTABLE is either bash, or win-bash or in > some cases only sh (on unix without bash), with full absolute path. > Problem is now, that in some of the test scripts "sh" is used - what I > did was to replace that with @SH_EXECUTABLE@ - worked ok on windows, > should also work on linux, shouldn't it? Also the first line of all sh > files needs to be replaced from #!/bin/sh to [EMAIL PROTECTED]@ - this > will be in most cases now bash instead of sh, but this is no problem > isn't it?
Yes, everything seems fine. Go ahead and commit your proposed changes. > But on the other hand, are this scripts also used by the > (deprecated) automake build system? Are these changes allowed than? Well, your changes will stop autotools tests. I will fix this up (by defining SH_EXECUTABLE in autotools to be /bin/sh) after your commit with low priority since the number of cvs autotools users at the moment who are running tests must be pretty low. > > in plplot-test.sh is another line at the end, which wants sed. Is it > possible to replace it? Well, that sed construct is trying to find the directory name where the script resides, i.e., the directory name corresponding to $0. when bash is available you can use the '%CHARACTER*' parsing construct to remove everything from the last CHARACTER onward in the string. Here is a simple example of this parsing construct (taken from http://tldp.org/LDP/abs/html/parameter-substitution.html which is an extremely helpful reference): [EMAIL PROTECTED]> xxxx=/home/user/xxx.yyy [EMAIL PROTECTED]> echo ${xxxx%/*} /home/user So ${0%/*} should get the directory of $0 in the Unix/bash case, but you may need to replace the unix directory separator "/" with the windows directory separator "\" in the win-bash case. Anyhow, once you have sorted this out, then just go ahead and commit, and we will correct it on the Unix side of things if necessary. (It's not the end of the world if the test system quits working for a bit.) Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel