adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] Makefile question


From: Kai Sterker
Subject: Re: [Adonthell-devel] Makefile question
Date: Sun, 4 Oct 2009 22:41:49 +0200

On Sun, Oct 4, 2009 at 9:20 PM,  <address@hidden> wrote:

> A second option is to commit a file wnd_questedit.h that contains:
> #ifndef WND_QUESTEDIT_H
> #define WND_QUESTEDIT_H
>
> char main_wnd[] =
> #include "questedit.glade.h"
> ;
>
> #endif
>
> The in the makefile do:
> wnd_questedit.h: questedit.glade.h #don't need to do anything just need the
> dependency

Instead of the second include file, I guess I can just do the above
with the actual source file that needs to contain the UI definition.
Looks a bit strange, but I'm sure it'll work :-). Thanks!

> questedit.glade.h: questedit.glade
> sed -e 's/"/\\"/g' -e 's/>$/>"/' -e 's/^( *)</\1"</' $< > $@

For the record, the following has the proper sed command and should
work with an out-of-source build too:

$(srcdir)/questedit.glade.h : questedit.glade
        sed -e 's/"/\\"/g' -e 's/>$$/>"/' -e 's/^\( *\)</\1"</' $< > $@

Seems like $$ is required to escape the $ from automake(?). And not to
forget that we're dealing with old-style regex here, so we'll need
\(\) for capturing groups.

Now if only glade 3.6.7 didn't have some nasty bugs when dealing with
tree columns. Still have to manually tweak the generated file by hand
:-(.

Kai




reply via email to

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