Dear Rony,

As I already stated this modification involves changes to CMakeLists.txt that 
are beyond my knowledge. It is not merely adding a shebang to the samples, the 
shebang is created during the build, potentially differently for different 
platforms. I was not able to make this work, hence my question to the CMakeList 
savvy to do it. As Gil pointed out already many files on Windows lack the 
hashbang so there is already a mix on Windows. One would need to look in more 
than one place in CMakeLists.txt to perform the change possibly, it is not so 
straight forward as I originally thought.

The list in the bug report is not complete, I found at least one more (there 
might be other as well), here the list on an installed CentOS machine:

/usr/local/share/ooRexx/samples/api/classic/callrexx/example.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/load_macro.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/del_macro.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/macros.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/startrx1.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/startrx2.rex
/usr/local/share/ooRexx/samples/api/classic/callrexx/startrx3.rex

/usr/local/share/ooRexx/samples/api/classic/rexxapi1/apitest1.rex
/usr/local/share/ooRexx/samples/api/classic/rexxapi2/apitest2.rex
/usr/local/share/ooRexx/samples/api/classic/rexxapi3/apitest3.rex



Hälsningar/Regards/Grüsse,
ooRexx
oor...@jonases.se



> Am 12.03.2025 um 12:34 schrieb Rony G. Flatscher <rony.flatsc...@wu.ac.at>:
> 
> On 10.03.2025 18:14, ooRexx wrote:
>> I mistakenly took ownership of this bug report but then have not managed to 
>> solve it, it involves changes to CMakeLists.txt beyond my knowledge.
>> 
>> Does anyone want to have a go at it or should I mark it as “Won’t Fix” ? The 
>> title explains what it is about.
> Looked up what hashbang gets created for Windows and it is "#!/usr/bin/env 
> rexx". On Windows the first line gets wiped out if it starts with the 
> hashbang "#!".
> 
> The hashbang is important on Unix systems as it uses the "/usr/bin/env" 
> program to locate the executable "rexx" which gets started by the shell 
> supplying the filename that contains the hashbang as its first argument and 
> is marked to be executable. Hence a command like
> 
> ./qtime.rex
> will cause the shell to locate the binary "rexx" to run it, if qtime.rex is 
> set to be executable on Unix. (On Windows "qtime.rex" will cause to Windows 
> to execute "rexx.exe" with "qtime.rex" as argument due to the file extension 
> ".rex". Cf. environment variable PATHEXT and the commands "ftype" and 
> "assoc".)
> 
> Mostlikely that convention will not really change on Unix systems (changing 
> this convention on Unix would affect literally billions of files).
> 
> As such I would assume to be safe to add the hashbang "#!/usr/bin/env rexx" 
> as the first line directly to all those files that you found not to have it. 
> Then all Rexx scripts would adhere to the hashbang pattern.
> 
> ---rony
> 
> 
> 
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to