[CMake] How to make a target depends from target 'all'

Mehdi Rabah mehdi.rabah at gmail.com
Thu Apr 3 07:35:58 EDT 2008


On Wed, Apr 2, 2008 at 9:01 PM, Alexander Neundorf <a.neundorf-work at gmx.net>
wrote:

> On Wednesday 02 April 2008, you wrote:
> > On Tue, Apr 1, 2008 at 10:15 PM, Alexander Neundorf
> ...
> > ok but there must be some way to say that I want to rebuild my project
> when
> > I call this specific "sync" target ? or am I doomed for the rested of my
> > life to type "make all && make sync" ?
> >
> > > Would "make clean all" be good enough ?
> >
> > Is this a mistake or an april fool's day joke ? I wasn't talking about
> > "clean" so I don't get it ^^
>
> You said you want to rebuild everything, so what's wrong with "make clean"
> followed by make ?
> I guess somehow I don't understand what you want to do.
>

ok then I re-explain : I have a custom rule "sync" that send binaries to a
embedded computer. To make sure that the binaries that I send are the
lastest version (ie the source have recompiled since my last modification) I
wanted to make my "sync" target depend on "all". ie when I type "make sync"
the project is rebuild before the synchronisation is made. the same result
can be done by typing "make && make sync" but I want it to be managed by
cmake because other people in the project doesn't need to know that they
need to rebuild the project before each sync. They just have to know "make
sync".




>
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080403/153f934d/attachment.htm>


More information about the CMake mailing list