|
From: | Shigio YAMAGUCHI |
Subject: | Re: [RFC] A project basis configuration mechanism |
Date: | Wed, 7 May 2014 15:16:17 +0900 |
--Hi all,I propose a project basis configuration mechanism.This is based on Leo's idea.1. Project basis configuration file1.1 gtags.confYou can use 'gtags.conf' file per project. File nameshould be always 'gtags.conf', and should be put onthe root directory of each project.For example,$ vi gtags.conf$ gtags$ global -x mainis equal to$ vi gtags.conf$ export GTAGSCONF=`pwd`/gtags.conf$ gtags$ global -x main1.2 gtags.labelAdditionally, you can use 'gtags.label' file to specifya label of configuration files. The contents of the fileis used as a label name. By using it, you can collectvarious definitions in one file. For example,[$HOME/.globalrc]+-------------------------|default:...|perlproj:... <= definitions for perl projects|phpproj:... <= definitions for php projects(in a perl project)$ echo 'perlproj' >gtags.label$ gtagsis equal to$ GTAGSLABEL=perlproj gtags1.3 IndependencyThe two above-mentioned files are available separatelyor together.2. Priority1.2 gtags.confPriority to select a configuration file is like follows:(Lower number means higher priority)Priority Configuration file------------------------------------------------------1 $GTAGSCONF2 <project root>/gtags.conf <= NEW3 $HOME/.globalrc4 /etc/gtags.conf5 /usr/local/etc/gtags.confdefault (do not use configuration file)The point is that project basis gtags.conf is given higherpriority than $HOME/.globalrc. It realizes the followings.o You can write your default configuration in $HOME/.globalrc.o If you need individual configuration per project, then youcan write 'gtags.conf' file for each project.2.2 gtags.labelPriority to select a configuration label is like follows:(Lower number means higher priority)Priority Label------------------------------------------------------1 $GTAGSLABEL2 contents of <project root>/gtags.label <= NEWdefault 'default'Any comment?Shigio YAMAGUCHI <address@hidden>PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
[Prev in Thread] | Current Thread | [Next in Thread] |