How do you get the list of targets in a makefile?

后端 未结 20 1492
难免孤独
难免孤独 2020-11-30 16:50

I\'ve used rake a bit (a Ruby make program), and it has an option to get a list of all the available targets, eg

> rake --tasks
rake db:charset      # ret         


        
20条回答
  •  半阙折子戏
    2020-11-30 17:32

    This obviously won't work in many cases, but if your Makefile was created by CMake you might be able to run make help.

    $ make help
    The following are some of the valid targets for this Makefile:
    ... all (the default if no target is provided)
    ... clean
    ... depend
    ... install
    etc
    

提交回复
热议问题