Override SDEF for particular build


#1

Hiya,

I want to use the SMS Inbox service for a particular project (with a sdef file). The doco says:

By default, smsInboxService starts manually. To start it automatically, the user can remove the option from the smsInboxService.adef file.

So, I can go to the base legato build directory and modify the appropriate .adef file. But that will enable the smsInbox Service for ALL builds based on the default.sdef file for this Legato distribution.

my question:

Is there a way to override a particular adef for a specific build sdef?

Or do I need to copy the smsInbox tree into my own project build tree and modify the adef there? But to do this, I then need to modify the default.sdef file in the legato build directory - which the documentation specifically advises against doing?

All thoughts and suggestions welcome…

Thanks, Dave


#2

Hello @davidc, Yes, you can copy the SMSInbox tree into your own project build tree and modify the sdef there to include the smsInbox.adef instead of modifying the default.sdef.


#3

Hi @riotc,

Ta.

Will the copy I make in my own sdef override the original in the default.sdef? Or will there be two copies? Or will mksys get upset?

ciao, Dave


#4

Hi @davidc,

you can use SDEF_TO_USE=<path to new sdef> to override the sdef used by the build system.

To write that new sdef, you can either copy (not recommended) or use #include "$LEGATO_ROOT/default.sdef" to inherit the default.sdef for instance.

modules/WiFi/wifi.sdef uses that principle for instance.


#5

Hi @CoRfr,

Ta for the info. But I realised that I hadn’t explained myself properly.

I am building a ‘system’ (lets call it test.sdef) in my own directory to add my own apps (adef) to the build.

I have included the default sdef #include "$LEGATO_ROOT/default.sdef" as you suggested.

But I need to modify one of the system provided apps that are bundled in the default.sdef - in my case I need one of the sms applications to start automatically at runtime - at the moment the default application adef has the application startup set to manual.

So, instead of modifying the default application adef, I’ve copied the application build tree into my own development folder (as suggested by @riotc) and modified the adef appropriately.

So now I have two applications with the same name - one in the default.sdef, and one in my custom sdef.

So my question should have been:

Will the build system override/replace the app defined in default.sdef with my app of the same name? Or will I have to edit the default.sdef to remove the duplicate (default) app?

ciao, Dave


#6

Unfortunately, as of now you need to edit the original one.

The only way to override without editing the original repo is to copy the original default.sdef, copy the application.adef in your own repo and then updating the app.


#7

Hiya,

Ta. That’s what I thought (and was hoping was not the case).

Thanks for getting back so quickly.

ciao, Dave