Detect if VFS module is being compiled inside or outside source tree

Richard Sharpe realrichardsharpe at gmail.com
Tue Mar 20 21:47:59 MDT 2012


On Tue, Mar 20, 2012 at 8:26 PM, Andrew Klaassen <clawsoon at yahoo.com> wrote:
> --- On Tue, 3/20/12, Richard Sharpe <realrichardsharpe at gmail.com> wrote:
>
>> On Tue, Mar 20, 2012 at 11:07 AM, Andrew Klaassen <clawsoon at yahoo.com>
>> wrote:
>> > Is there an #ifdef I can check to find out whether a VFS module is
>> > being built inside or outside the source tree?
>>
>> With a commit I made a little while ago, I don't think you
>> need to know, do you?
>
> I was working off 3.6.3 sources and the (very helpful) VFS guide you
> wrote last year.  I'll check your recent commits and follow up if I still need
> a hand; apologies for not checking them already.

I thought that the macros took care of that. That is, I though that

Hmmm, no, I recovered an email about a gratuitous change to this where I said:

> Are you sure about that. I though that all the shared modules in the
> tree use <module_name>_init, which, through the magic of configure and
> defines, is converted to what is required by that build. (Either
> init_samba_module or samba_module_init, depending on the version but
> controlled by the appropriate M4 macro.)
>
> However, those who build outside the Samba tree, and those with static
> modules, will need to manually convert.
>
> However, I did not correctly indicate those who will be affected, and
> I have corrected that in my recent post.

So, I think you are correct and it is more difficult than it should be.

I should have a look at the macros and make it simpler.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list