[Cmake] Autological Makefiles
Bill Hoffman
bill.hoffman at kitware.com
Mon Jun 4 09:20:11 EDT 2001
The way to do this is to do this:
# this is what people get when they just type make
default_target:
make makefile # first make sure the makefile is up-to-date
make all # now rerun make for the all target, if the makefile was
# regenerated, it will now be re-read
# this is the all target
all: the real targets
At 01:21 PM 6/4/2001 +0100, John Biddiscombe wrote:
>The Unix Makefile Generator creates rules for itself!
>
>This is quite sensible and clever, because if the cmakelists.txt etc is newer than the makefile it'll run cmake and regenerate itself.
>
>Question:
>Does the make abort itself, and re-execute with the new makefile automatically (even on windows?), or does one need to insert a "Stop", then "Restart" mechanism by hand.
>
>It would be fine to do
>makefile : cmakelists.txt ....
> echo. This makefile is out of date and has been regenerated, please rerun make
> some "abort" command here
>
>but if it can be made to resart automatically, it'd be better.
>
>How does one handle this?
>
>thanks
>
>JB
>
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list