Simple Sand Samples |
説明のないとってもシンプルなサンプルプログラム集
COBOL | awk | C言語 | D言語 | GO言語 | Lua | Vim |
bash | Perl | Gauche | Clojure | CLISP | EmacsLisp | VimScript |
tcsh | Ruby | Groovy | Java | C# | VBScript | JavaScript |
Io言語 | Python | Erlang | Scala | VB.NET | Excel/VBA | PHP |
Tcl | Haskell | OCaml | PowerShell | Windows | Unix/Linux |
Linuxコマンド > GNU GLOBAL source code tagging system
|
|
ソースからインストール
~$ wget hftp://ftp.gnu.org/pub/gnu/global/global-6.5.3.tar.gz~$ tar xzf global-6.5.3.tar.gz
~$ cd global-6.5.3
~$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
*snip*
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
~$ make
make all-recursive
make[1]: Entering directory '/home/hoge/global-6.5.3'
*snip*
libtool: link: gcc -g -O2 -o gtags-cscope gtags-cscope.o alloc.o
make[2]: Leaving directory '/home/hoge/global-6.5.3/gtags-cscope'
make[2]: Entering directory '/home/hoge/global-6.5.3'
make[2]: Leaving directory '/home/hoge/global-6.5.3'
make[1]: Leaving directory '/home/hoge/global-6.5.3'
~$ sudo make install
make[1]: Entering directory '/home/hoge/global-6.5.3/libglibc'
make[2]: Entering directory '/home/hoge/global-6.5.3/libglibc'
*snip*
/usr/bin/install -c -m 644 AUTHORS COPYING COPYING.LIB ChangeLog
make[2]: Leaving directory '/home/hoge/global-6.5.3'
make[1]: Leaving directory '/home/hoge/global-6.5.3'
globalの確認用にLinuxカーネルソース取得
~$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.6.tar.xz~$ tar xJf linux-4.4.6.tar.xz
~$
タグ打ち
~$ cd linux-4.4.6~/linux-4.4.6$ gtags
~/linux-4.4.6$
タグの定義ソースを探す
~/linux-4.4.6$ global start_kernelarch/alpha/boot/bootp.c
arch/alpha/boot/bootpz.c
arch/alpha/boot/main.c
init/main.c
~/linux-4.4.6$
ソース内の全タグ表示
~/linux-4.4.6$ global -f init/main.cDEBUG 12 init/main.c #define
mark_rodata_ro 97 init/main.c static i
MAX_INIT_ARGS 115 init/main.c #define
MAX_INIT_ENVS 116 init/main.c #define *snip*
set_reset_devices 153 init/main.c static
obsolete_checksetup 167 init/main.c stati
*snip*
~/linux-4.4.6$