Brain Phrye

code cooking diy fiction personal photos politics reviews tools 


Realtime doxygen

[ Listen to article ]

One of the annoying things about doing docs in doxygen is forgetting to type make between edits and checking what it’s rendering like.

Luckily there are inotify-tools which, when combined with a simple shell loop, let you rebuild your docs whenever their source files change. By the time I’d switched to the browser and refreshed it the docs had been rebuilt. Not exactly WYSIWG editting but it skips the “forget to run make” step which is annoyingly tedious.

1
2
3
4
5
while inotifywait protobuf-c/*.[ch] Doxyfile; do
  sleep 1
  make doxygen-doc
  date
done