1# Copyright: 2015 Masatake YAMATO 2# License: GPL-2 3 4CTAGS=$1 5BUILDDIR=$2 6ARGS="--quiet --options=NONE" 7O=TAGS.TMP 8 9. ../utils.sh 10 11for x in no yes default; do 12 touch $BUILDDIR/${x}-$O 13done 14 15if ! direq_maybe $BUILDDIR .; then 16 cp -r indirect $BUILDDIR 17 copied=yes 18fi 19( 20 cd $BUILDDIR/indirect 21 22 ${CTAGS} ${ARGS} -e -o ../no-${O} --tag-relative=no src/input.c 23 ${CTAGS} ${ARGS} -e -o ../yes-${O} --tag-relative=yes src/input.c 24 ${CTAGS} ${ARGS} -e -o ../default-${O} src/input.c 25) 26 27for x in no yes default; do 28 echo '#' ${x} 29 # convert path separators in the output 30 sed -e 's|\\|/|g' $BUILDDIR/${x}-$O 31 rm $BUILDDIR/${x}-$O 32done 33 34if [ "$copied" = "yes" ]; then 35 chmod -R u+w $BUILDDIR/indirect 36 rm -rf $BUILDDIR/indirect 37fi 38 39exit $? 40