octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: pkg - post_install.m


From: Carnë Draug
Subject: Fwd: pkg - post_install.m
Date: Thu, 12 Sep 2013 17:42:12 +0100

On 11 September 2013 16:33, marco Vassallo <address@hidden> wrote:
> ----------------------------------------
>> From: address@hidden
>> Date: Wed, 11 Sep 2013 16:25:22 +0100
>> Subject: Re: pkg - post_install.m
>> To: address@hidden
>> CC: address@hidden
>>
>> On 6 September 2013 08:52, marco Vassallo <address@hidden>
>> wrote:
>> > I have a little problem using pkg.
>> >
>> > After the installation, I need to move a file from the folder where the
>> > DLD-function are installed ("x86_64-unknown-linux-gnu-api-v48+" on my
>> > pc) to
>> > another directory.
>> >
>> > function post_install (desc)
>> >
>> > func = fullfile (desc.dir, "@function");
>> > [status, msg] = mkdir (func);
>> >
>> > [status, msg, msgid] = movefile ('./src/feval.oct', func, 'f');
>> >
>> > endfunction
>>
>> I took a closer look at this and noticed that you're trying to move an
>> oct file (architecture dependent), into a new directory where the .m
>> files are meant to go. We make a distinction between the two. Why are
>> you doing this?
>>
>
> I'm moving an oct file to the @mesh folfder, which I think is the only way
> for implementing polymorphism.

Then what you should be doing is name those functions __mesh_xxx__
(they can all be in the same oct file), and have .m files in the @mesh
folder that only call the __mesh_xxx__ functions. Take a look at how
the ftp class is implemented in octave core [1, 2]. Basically, the
files @ftp/cd.m, @ftp/dir.m, etc, are very simple calls to __ftp_pwd__
and __ftp_dir__ which are all in the urlwrite.oct file.

Carnë

[1] http://hg.savannah.gnu.org/hgweb/octave/file/95bfa04ab514/scripts/%40ftp
[2] 
http://hg.savannah.gnu.org/hgweb/octave/file/95bfa04ab514/libinterp/dldfcn/urlwrite.cc


reply via email to

[Prev in Thread] Current Thread [Next in Thread]