#16537: Setup a code cross reference server
-------------------------+--------------------------
Reporter: pulkomandy | Owner: haiku-web
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Sys-Admin | Version: R1/beta2
Keywords: | Blocked By:
Blocking: | Platform: All
-------------------------+--------------------------
xref.landonf.org is offline. It would be nice to have a tool we host
ourselves for this instead.
I had some success with setting up woboq at
http://pulkomandy.tk/woboq/haiku/
It uses a static generation approach: generating a lot of html files at
build time and then we just have to serve that.
Here are some quick notes on what I did:
You need a jam with the -c option to generate compile_commands.json
(https://review.haiku-os.org/c/buildtools/+/3260). You need woboq
installed on the build machine to generate the things.
Checkout Haiku and buildtools as usual. You need to build with gcc8
(because with gcc2 you get some errors with unrecognized compiler
options).
Do a clean build adding the -c option to the jam command line (I used jam
-cj2 without -q to let it build as much files as possible even in case of
build fails). A clean build is required because the compile_commands is
only written when the commands are actually run.
{{{
mkdir woboq/haiku
codebrowser_generator -a -b=compile_commands.json -o=woboq/haiku -p
Haiku:/home/pulkomandy/haiku/haiku/ -d https://pulkomandy.tk/woboq/data/
codebrowser_indexgenerator woboq/haiku/
sudo cp -r /usr/share/woboq/data woboq/
}}}
Replace /home/pulkomandy/haiku/haiku with the path to Haiku sources
(anything outside that directory will not be indexed), replace
https://pulkomandy.tk/woboq/data/ with where the data will be served from
(it's javascript files that can be shared between different generated
projects if we decide to do that for more than just haiku).
Then the woboq/ directory can be published using any webserver that can
publish html files.
I think we could integrate this with the Haiku buildsystem.
--
Ticket URL: <https://dev.haiku-os.org/ticket/16537>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.