ftp://mama.indstate.edu/linux/tree/
より、最新バージョンのファイルを取得する
$ wget ftp://mama.indstate.edu/linux/tree/tree-1.5.2.1.tgz
$ tar xzvf tree-1.5.2.1.tgz
tree-1.5.2.1/CHANGES
tree-1.5.2.1/INSTALL
tree-1.5.2.1/LICENSE
tree-1.5.2.1/Makefile
tree-1.5.2.1/README
tree-1.5.2.1/tree.c
tree-1.5.2.1/strverscmp.c
tree-1.5.2.1/man/tree.1
tree-1.5.2.1/man/tree.1.fr
$ cd tree-1.5.2.1
$ less INSTALL
$ make
gcc -O2 -Wall -fomit-frame-pointer -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o tree.o tree.c
gcc -s -o tree tree.o
$ sudo make install
$ ll
total 192
-rw-r--r-- 1 suzu suzu 5907 2008-08-27 15:10 CHANGES
-rw-r--r-- 1 suzu suzu 362 2008-08-27 14:25 INSTALL
-rw-r--r-- 1 suzu suzu 18009 2004-08-12 16:38 LICENSE
-rw-r--r-- 1 suzu suzu 1801 2008-08-27 14:34 Makefile
drwxrwxr-x 2 suzu suzu 4096 2008-09-21 17:44 man
-rw-r--r-- 1 suzu suzu 3583 2008-08-27 14:23 README
-rw-r--r-- 1 suzu suzu 5322 2008-08-27 13:34 strverscmp.c
-rwxrwxr-x 1 suzu suzu 36688 2008-09-21 17:45 tree
-rw-r--r-- 1 suzu suzu 52163 2008-08-27 15:05 tree.c
-rw-rw-r-- 1 suzu suzu 48720 2008-09-21 17:45 tree.o
$ ./tree
.
|-- CHANGES
|-- INSTALL
|-- LICENSE
|-- Makefile
|-- README
|-- man
| |-- tree.1
| `-- tree.1.fr
|-- strverscmp.c
|-- tree
|-- tree.c
`-- tree.o
1 directory, 11 files
$ sudo make install
Password:
install -d /usr/bin
install -d /usr/man/man1
if [ -e tree ]; then \
install -s tree /usr/bin/tree; \
fi
install man/tree.1 /usr/man/man1/tree.1
$
configure は無いので、インストールオプションは Makefile を編集して行う。
wget ftp://mama.indstate.edu/linux/tree/tree-1.5.2.1.tgz
tar xzvf tree-1.5.2.1.tgz
cd tree-1.5.2.1
make
sudo make install