[Cmake] Autological Makefiles

Bill Hoffman bill.hoffman at kitware.com
Mon Jun 4 13:45:28 EDT 2001


That is not quite what I suggested.
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


I would try this:

# use this as the first target in your makefile.mak
# The first thing it does is re-run make with the target makefile.mak
# If that does regenerate the makefile.mak, the next make ALL should
# re-read it.
DEFAULT:
   make makefile.mak
   make ALL


What is the borland make program called?  With unix make, you can use $(MAKE) to
call yourself.

-Bill



At 05:52 PM 6/4/2001 +0100, John Biddiscombe wrote:
>I've got the makefile as the first rule and the remainder following, but Make doesn't reload the makefile. It just carries on using "itself" rather than the new makefile. I've tried a few variations, but can't make it reload itself...
>
># The project ALL rule
>ALL: makefile.mak ${TARGETS} ${SUBDIR_BUILD} "D:\vtknew\CMake\Source\BCBcmakeGui\CMake_BCB.exe"
>
># Rule to build the makefile
>makefile.mak: "D:\vtknew\CMake\Source\BCBcmakeGui\CMake_BCB.exe" ${CMAKE_MAKEFILE_SOURCES}
>  "D:\vtknew\CMake\Source\BCBcmakeGui\CMake_BCB.exe" -Hd:\vtknew -Bd:\vtk_bin
>
>any suggestions...
>
>JB





More information about the CMake mailing list