#!/bin/sh 
#
# $Id: zk_maketags,v 1.4.32.1 2000/12/14 17:51:25 jean Exp $
#
ZK_PROJ_ROOT=${ZK_PROJ_ROOT?"environment variable is not set"}

dirs="$ZK_PROJ_ROOT/include $ZK_PROJ_ROOT/freedom $ZK_PROJ_ROOT/libz* $ZK_PROJ_ROOT/libcz*"
dirs="$dirs $ZK_PROJ_ROOT/lib3rd/*/include/*.h"
dirs="$dirs /usr/include/*.h /usr/include/g++/*/*.h"

echo "Using $ZK_PROJ_ROOT/TAGS as etags file"
cd $ZK_PROJ_ROOT && \
cp /dev/null $ZK_PROJ_ROOT/TAGS && \
find $dirs -type f \( -name "*.c" -or -name "*.h" -or -name "*.hpp" -or -name "*.cpp" -or -name "*.tcc" -or -name "Makefile" \) -print -exec etags -d -l c++ --c++ -I -S -o $ZK_PROJ_ROOT/TAGS -a {} \; >& /dev/null
