[Gambas-user] New features on the wiki
Benoît Minisini
gambas at ...1...
Mon Dec 8 19:53:14 CET 2014
Le 06/12/2014 14:25, Tobias Boege a écrit :
> On Thu, 13 Nov 2014, Tobias Boege wrote:
>>> No, the source tree may not beavailable on the wiki, only the *.info files.
>>>
>>> Why not adding an optional "*.help" file that would come with the *.info
>>> file?
>>>
>>> This file could have almost the same format as the *.info file, except
>>> that it includes only the help. Your script would have to generate that
>>> file - I don't know what it does exactly at the moment...
>>>
>>> The format is:
>>>
>>> #<class #1>
>>> <symbol #1>
>>> '<Help line #1>
>>> '<Help line #2>
>>> '...
>>> <symbol #2>
>>> ...
>>> #<class #2>
>>> ...
>>>
>>> Then either you keep your script, and you send me the *.help files so
>>> that I put them on the wiki server.
>>>
>>> Better would be having your script inside the source tree, and let it
>>> run automatically on the C/C++ sources with specific Makefile.am rules.
>>>
>>> That script can be written in Gambas. But then it will be run at "make
>>> install" stage, once the interpreter has been compiled.
>>>
>>> What do you think?
>>>
>>
>> Maybe I should rewrite it in Gambas. At this time it's 5 programs (in 4
>> different languages!) piping into one another. The first four preprocess
>> the C/C++ comments and the last is a really hackish C program which takes
>> these help lines and merges them to the right place in a given .info file.
>> When I wrote these, I was all about (development) speed. It may be cool to
>> have all that in one program (and one language only).
>>
>> The above format (and an extra file for it!) would be really good because
>> that's information the program can gather from the C/C++ source files alone.
>> No need to mess with the .info files then.
>>
>> Weekend...
>>
>
> Of course I meant this weekend, not the one 3 weeks ago...
>
> The scripts are in the c2help directory in the source tree root since #6712.
> Try them on gb.openssl:
>
> $ c2help/c2help.sh gb.openssl 2>/dev/null
> #Digest
> List
> ' Return a list of all digests present in the local OpenSSL crypto library.
> _get
> ' Return a virtual object representing a digest algorithm by giving its
> ' name. Valid names can be looked up from Digest.List.
> IsSupported
> ' Check whether the named digest algorithm is valid.
> #.Digest.Method
> Hash
> ' Hash the given string using this digest algorithm.
> _call
> ' A synonym for Hash.
> #Cipher
> List
> ' Return a list of all ciphers present in the local OpenSSL crypto library.
> [...]
>
> One script is a gbs3 one, so all that needs to take place at "make install",
> as you said. Apart from that I need bash (with read and exit builtins), gawk,
> grep, sed and the coreutils (cat, tr and echo) -- to give an extensive list.
> Shouldn't be too exotic. But in case someone doesn't have egrep, sed or gawk,
> the help generation stage should be omitted since it's optional. I see no
> need to reduce the dependencies on my side.
>
> Regards,
> Tobi
>
The way you did is not really useful. You should have written a pure
Gambas program with no dependencies, so that it can be run at "make
install" stage automatically.
You have introduce many dependencies, which means a lot of problems if
in the future Gambas is ported on a non-GNU system (Android, for example).
Moreover, /trunk is not the location for a compilation tool. You should
have put it in /trunk/app/src for example.
Regards,
--
Benoît Minisini
More information about the User
mailing list