[prev in list] [next in list] [prev in thread] [next in thread]
List: fossil-users
Subject: [fossil-users] Mini-HOWTO: rtags + Emacs + Fossil
From: Johan Kuuse <johan () kuu ! se>
Date: 2018-04-05 16:50:37
Message-ID: CAGUU1d3gLbaz2Vw73PQQFVm3B5JK2eycdMRxe=Nw9CwhWpi3UA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
This mail is focused to Emacs users on *NIX platforms who are browsing the
Fossil source code.
I have recently started using rtags, a powerful source code indexer for C
and C++, and just wanted to share my positive experiences.
Read more at
https://github.com/Andersbakken/rtags
I attach an "interactive help" Makefile which shows the setup steps for
using rtags with the Fossil source code in a simplified way.
If you consider this should be included in a developer's Wiki, please let
me know.
Best Regards,
Johan
------------------------------------------------------------
# Helper Makefile for setting up rtags with fossil
SHELL := /bin/sh
THIS_DIR := `pwd`
THIS_MAKEFILE := `if [ -n "$(MAKEFILE_LIST)" ];then echo
"$(MAKEFILE_LIST)";else if [ -n "$(.PARSEFILE)" ];then echo
"$(.PARSEFILE)";else echo Makefile; fi; fi`
.PHONY: help setup
# Help
help:
@echo
@echo "1. To use rtags, you need:"
@echo
@echo " BSD|Linux|Mac OS + Emacs"
@echo " At the time of writing this, MS Windows is not supported.
:-("
@echo
@echo "2. Read the 'rtags' docs and get the source code:"
@echo
@echo " https://github.com/Andersbakken/rtags"
@echo
@echo "3. rtags dependencies basically are (read the docs for details):"
@echo
@echo " llvm"
@echo " cmake"
@echo " bear"
@echo
@echo "4. For details about how to setup rtags to work with Fossil,
type:"
@echo
@echo " make setup -f $(THIS_MAKEFILE)"
@echo
setup:
@echo
@echo "1. If not done already, create a 'rtags' cache directory in your
home directory '$$HOME':"
@echo
@echo " mkdir -p ~/.rtags"
@echo " echo '--data-dir=~/.rtags' > ~/.rdmrc"
@echo
@echo "2. In the root directory of a Fossil checkout, create a JSON
Compilation Database for this project, based on a clean build."
@echo " Note that some files are not compiled by default (for example
src/json*.c), so they will not be indexed by 'rtags' unless configured"
@echo
@echo " make clean"
@echo " ./configure --json --with-th1-hooks --with-your-options-here
(optional)"
@echo " bear make"
@echo
@echo "3. Tweek the database for Fossil:"
@echo
@echo ' sed -i"" -e
"s,$(THIS_DIR)/bld/\([A-Za-z]*\)_\.c,$(THIS_DIR)/src/\1.c,g" -e
"s,bld/\([A-Za-z]*\)_\.c,$(THIS_DIR)/src/\1.c,g" compile_commands.json'
@echo
@echo "4. If not done already, start the rtags daemon, 'rdm' (this can
also be done inside Emacs):"
@echo
@echo " rdm --daemon"
@echo
@echo "5. Start the rtags client in this directory (this can also be
done inside Emacs):"
@echo
@echo " rc -J ."
@echo
@echo "6. Start Emacs and configure 'rtags.el' to browse the 'src/'
directory."
@echo
------------------------------------------------------------
[Attachment #5 (text/html)]
<div dir="ltr"><div><div>Hi,<br><br></div><div>This mail is focused to Emacs users on \
*NIX platforms who are browsing the Fossil source code.<br></div><div><br></div>I \
have recently started using rtags, a powerful source code indexer for C and C++, and \
just wanted to share my positive experiences.<br></div>Read more \
at<br><div><div><br><a href="https://github.com/Andersbakken/rtags"><font \
size="1"><span style="font-family:monospace,monospace">https://github.com/Andersbakken/rtags</span></font><br></a><br></div><div>I \
attach an "interactive help" Makefile which shows the setup steps for using \
rtags with the Fossil source code in a simplified way.<br></div><div>If you consider \
this should be included in a developer's Wiki, please let me \
know.<br></div><div><br></div><div>Best \
Regards,<br></div><div>Johan<br></div><div><br><br><font size="1"><span \
style="font-family:monospace,monospace">------------------------------------------------------------<br></span></font><br><br><font \
size="1"><span style="font-family:monospace,monospace"># Helper Makefile for setting \
up rtags with fossil<br><br>SHELL := /bin/sh<br>THIS_DIR := \
`pwd`<br>THIS_MAKEFILE := `if [ -n "$(MAKEFILE_LIST)" ];then echo \
"$(MAKEFILE_LIST)";else if [ -n "$(.PARSEFILE)" ];then echo \
"$(.PARSEFILE)";else echo Makefile; fi; fi`<br><br>.PHONY: help \
setup<br><br># Help<br>help:<br> @echo<br> @echo "1. To use rtags, you \
need:"<br> @echo<br> @echo " BSD|Linux|Mac OS + \
Emacs"<br> @echo " At the time of writing this, MS Windows is not \
supported. :-("<br> @echo<br> @echo "2. Read the 'rtags' \
docs and get the source code:"<br> @echo<br> @echo " <a \
href="https://github.com/Andersbakken/rtags">https://github.com/Andersbakken/rtags</a>"<br> \
@echo<br> @echo "3. rtags dependencies basically are (read the docs for \
details):"<br> @echo<br> @echo " llvm"<br> @echo \
" cmake"<br> @echo " bear"<br> @echo<br> \
@echo "4. For details about how to setup rtags to work with Fossil, \
type:"<br> @echo<br> @echo " make setup -f \
$(THIS_MAKEFILE)"<br> @echo<br><br>setup:<br> @echo<br> @echo \
"1. If not done already, create a 'rtags' cache directory in your home \
directory '$$HOME':"<br> @echo<br> @echo " mkdir -p \
~/.rtags"<br> @echo " echo '--data-dir=~/.rtags' > \
~/.rdmrc"<br> @echo<br> @echo "2. In the root directory of a \
Fossil checkout, create a JSON Compilation Database for this project, based on a \
clean build."<br> @echo " Note that some files are not compiled by \
default (for example src/json*.c), so they will not be indexed by 'rtags' \
unless configured"<br> @echo<br> @echo " make \
clean"<br> @echo " ./configure --json --with-th1-hooks \
--with-your-options-here (optional)"<br> @echo " bear \
make"<br> @echo<br> @echo "3. Tweek the database for \
Fossil:"<br> @echo<br> @echo ' sed -i"" -e \
"s,$(THIS_DIR)/bld/\([A-Za-z]*\)_\.c,$(THIS_DIR)/src/\1.c,g" -e \
"s,bld/\([A-Za-z]*\)_\.c,$(THIS_DIR)/src/\1.c,g" \
compile_commands.json'<br> @echo<br> @echo "4. If not done \
already, start the rtags daemon, 'rdm' (this can also be done inside \
Emacs):"<br> @echo<br> @echo " rdm --daemon"<br> \
@echo<br> @echo "5. Start the rtags client in this directory (this can also \
be done inside Emacs):"<br> @echo<br> @echo " rc -J \
."<br> @echo<br> @echo "6. Start Emacs and configure \
'rtags.el' to browse the 'src/' directory."<br> \
@echo<br><br><br>------------------------------------------------------------<br><br></span></font></div></div></div>
["Makefile.rtags" (application/octet-stream)]
[Attachment #7 (text/plain)]
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic