Emailing: objectdescriptionmodel.patch

Richard richardmg at trolltech.com
Wed Jul 4 12:44:39 CEST 2007


Below is a script (consisting of two files) that lets you build  
phonon without having to modify the source.
Copy them into e.g. phonon src directory, and just type:
  ./createmoc
make

-Ric

(NB1: the script creates a filename.moc file for every relevant  
#include that it finds in the cpp files, and add a #include  
"moc_filename.cpp" inside them). Some sort of re-direct. Then we tell  
qmake not to make make-targets for the moc-files)

(NB2: this is not my suggestion on how to solve the problem, just a  
way to get around the problem for now...)

Scripts:

flexo:~/dev/private/projects/phonon/svn richard$ cat createmoc
#/bin/bash
grep "\.moc" *.cpp | /sw/bin/sed s/'.*"\([^ ]*\).moc".*'/'\1.moc'/ |  
xargs touch
find *.moc | xargs -L1 ../createmoc2
qmake -nomoc

flexo:~/dev/private/projects/phonon/svn richard$ cat createmoc2
#/bin/bash
echo "Fix: " $1
echo '#include "'$1'"' > $1
/sw/bin/sed -i s/'"\([^ ]*\).moc"'/'"moc_\1.cpp"'/ $1





On Jul 2, 2007, at 12:00 PM, Cyril Comparon wrote:

> Hi,
> Thierry and I suggest that we change every cpp file that includes  
> one or
> more moc files, this way:
>
> #ifdef PHONON_USING_QMAKE
> #  include "moc_factory.cpp"
> #  include "moc_factory_p.cpp"
> #else
> #  include "factory.moc"
> #  include "factory_p.moc"
> #endif
>
> ... and that we add DEFINES += PHONON_USING_QMAKE in phonon.pro.
> This way we would all work on the same source code :)
> Please let us know if it sounds reasonable.
>
> Cyril
>
> _______________________________________________
> Phonon-backends mailing list
> Phonon-backends at kde.org
> https://mail.kde.org/mailman/listinfo/phonon-backends



--
Richard Moe Gustavsen
Software Engineer II, Trolltech ASA
Sandakerveien 116, NO-0484 Oslo, Norway


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/phonon-backends/attachments/20070704/8b4207b3/attachment.html 


More information about the Phonon-backends mailing list