automoc4

Matthias Kretz kretz at kde.org
Tue May 6 17:00:47 CEST 2008


On Friday 02 May 2008, Matthias Kretz wrote:
> On Wednesday 30 April 2008, Alexander Neundorf wrote:
> > Von: Matthias Kretz <kretz at kde.org>
> > > On Tuesday 29 April 2008, Alexander Neundorf wrote:
> > > > Is there an easy way to enforce rerunning automoc ? Would it be
> > > > possible to
> > > > add a command line switch which does that ? Like e.g. deleting all
> > > > generated moc files or something like that ?
> > >
> > > Alternatives:
> > > 1. add a new target (I'd like to avoid that because it would add a lot
> > > of I/O on a cmake run)
> > > 2. make it easy to run automoc4 manually
> >
> > Yes, something like "automoc4 --clean" or something like this which does
> > that for the current dir and maybe all subdirs would be nice to have.
>
> How about the following:
> - automoc, when done, writes an empty file <target>_automoc.notclean
> - SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
> <target>_automoc.notclean)
> - automoc will recreate all moc files if the <target>_automoc.notclean file
> is not present (else it will work as it does now)
>
> =>
> after a make clean, running make which executes automoc will recreate all
> moc files.
>
> This would again need automoc to be called unconditionally (which I still
> believe would be good to do - and the touch can be done by automoc itself,
> which would be portable).

Patch attached (automoc.patch): I'm all for committing this.

I'm using this with the other patch against kdelibs/cmake - which makes the 
rest of KDE use the automoc from kdesupport.

On the first run all moc files will be regenerated, since the .notclean files 
don't exist yet. From then on it works as requested.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-cmake.patch
Type: text/x-diff
Size: 9235 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080506/674e71fe/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: automoc.patch
Type: text/x-diff
Size: 5800 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080506/674e71fe/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080506/674e71fe/attachment.pgp 


More information about the Kde-buildsystem mailing list