[RFC] Future of "messages" targets

Nicolas Goutte nicolasg at snafu.de
Tue Sep 13 14:45:19 BST 2005


On Tuesday 13 September 2005 12:49, Nicolas Goutte wrote:
> On Tuesday 13 September 2005 11:36, Stephan Kulow wrote:
> > Am Dienstag, 13. September 2005 11:25 schrieb Nicolas Goutte:
> > > The biggest question is how to convert the dependency to rc.cpp, which
> > > is the same as calling explicitly:
> > > $(EXTRACTRC) *.rc *.ui *.kcfg
> > >
> > > I see two way for converting this and I am not sure about the best one:
> > > - add the command explicitly in each makemessage.sh that needs it.
> > > - let the code calling those scripts do the job when necessary.
> >
> > I think we should provide shell functions that can be used from apps
> > shell scripts. So the calling code doesn't call the bash script but
> > sources it with the variables and the functions set. So you wouldn't do
> > "./k3b/messages.sh" but "admin/create-messages.sh k3b" - this way you
> > avoid too much of code duplication and still have a) the developer aware
> > of what is going on as he has to add a default_extractrc call in his
> > shell script and b) have a way to do a check if the default_extractrc is
> > in the shell script if there are *.rc files around (as we do now).
>
> The idea is surprising me and seems to be a step further that what I wanted
> to do. However perhaps this further step is needed.
>
> So if I understand you well you want something like:
>
> function makemessage
> {
>   $(XGETTEXT) *.cpp -o $(podir)/kio_floppy.pot
> }

Doing so brings a problem: there does not seem to be a way in Bash to call 
only a function (and not that a command of the same named is executed from 
somewhere in $PATH).

So I am not sure if defining a function is a good idea, as if the syntax is 
wrong, Bash could run something else instead.

But we need some custom-code to extract all extra data files, like extra XML 
files.

(...)

Have a nice day!





More information about the kde-core-devel mailing list