generate call hierarchy graph with ctags - ctags

Is there anyone who knows how to generate call hierarchy graph with ctags and cscope? I need to run the commands in the terminal and redirect the output to a file, rather than do it in vim.

You can use cflow to do this. Just use it as:
cflow main.c

Related

Makefile generate by CMake contains 'cmake' command

I'm trying to use cmake for the first time and it seam to be good except one things.
In the generated makefile, there are some kind of 'cmake command'. Like :
$(CMAKE_COMMAND) -E cmake_progress_start ... etc ...
I really want to generate makefile without any $(CMAKE_COMMAND).
Is it possible ?
Thx.
I doubt you can achieve that, because cmake executable is used to regenerate Makefiles if any of CMakeLists.txt are changed.
I just want to generate Makefile and ensure me that I can build my source code without Cmake.
I found a solution by just do :
make -i
It will ignore error and a call to cmake append and that work. It's a huge workaround but that's work so...
Thx for your answer.

Generate make file

I have a golang CLI program which generates a makefile to a specific project. While this works, there is an issue when the project already has a makefile. Of course I can check that in advance to avoid collusion, but how is it suggested to do it?
I'm not an expert in makefiles, but how can I create second makefile (maybe with the project name or something) that user can run via make (I guess with additional steps or info to the terminal)
You can generate it as Makefile.project and document to be run as make -f Makefile.project
You can give your Makefile whatever filename. Then make must be executed with parameter -f <your_filename> or --file=<your_filename>. See make manual on filenames.
Which version of make are you using? Some versions run special makefiles before others. For example, GNU make looks for the following files and runs the first one it finds: GNUmakefile, Makefile, makefile.
If you are using GNU make, then name your generated file GNUmakefile and add in the making any makefile already in the directory. That way, anyone running make in the directory will automatically run the generated makefike first.

Notepad++ with avr-gcc error

I want to create a run command in notepad++, that cleans/deletes the compiled files whenever I press Ctrl + M. So far I created this line of code :
cmd /k c:\WinAVR-20100110\utils\bin\make.exe make clean $(FULL_CURRENT_PATH)
It does not work and gives this warning :
No Rule To make target clean
Which technically means the parameter is wrong, however I did not find a way to correct it.
Any Suggestions
You don't want to pass make as an argument to make because then it will look for a target named make which is not defined.
Also, you would need to make sure make is running in the right directory. One way to do that is use the -C option. For example:
make -C path/to/my/dir clean
Some unsolicited tips: WinAVR is really old, see how you are using the version from 2010-01-10? I'd recommend using MSYS2 for your Bash shell environment and then installing the latest AVR 8-bit toolchain from Atmel.

MIT/Scheme as a simple compiler under Windows

Is there a possibility to use mit scheme as a simple compiler (without runing Edwin) in Windows?
I want to edit code in wditor of my choice and compile it, but I haven't found and option to do this.
When I execute...
mit-scheme < file.scm
...I get a window with:
"can't find a readable default for option --band.
searched for file all.com in these directories:
c:\local\mit-scheme"
If you'd like to save some typing every time you want to run mit-scheme.exe, you can add the mit-scheme-install-folder/lib path to the environment variable MITSCHEME_LIBRARY_PATH.
Try this:
mit-scheme --band mit-scheme-install-folder/lib/all.com \
--library mit-scheme-install-folder/lib --load file.scm
I know you said MIT-Scheme, but check out DrRacket (formerly, DrScheme), which runs Scheme code well from the command line.

Marking file as executable on OSX using C (Carbon, standard C/C++)

I'm looking for a way to programatically set the 'executable' bit on a file on OS X. I don't want to invoke 'chmod a+x' but I want the same effect as the chmod call. Any suggestions? A carbon API or any other C/C++ function would work...
See chmod(2), e.g. http://www.manpagez.com/man/2/chmod/osx-10.4.php (I think it's unchanged in 10.5).
There is a "chmod" C library call. Go to a terminal window and type "man 2 chmod".

Resources