Skip to content

Commit

Permalink
Tmain: run early--version-opt-processing.d in BUILDDIR
Browse files Browse the repository at this point in the history
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Dec 28, 2023
1 parent 4049b63 commit 50947f7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Tmain/early--version-opt-processing.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
# License: GPL-2

CTAGS=$1
BUILDDIR=$2

remove_ctags_d=y
if [ -d .ctags.d ]; then
if [ -d $BUILDDIR/.ctags.d ]; then
remove_ctags_d=n
fi

defc_ctags=tmain_defc.ctags
mkdir -p .ctags.d
echo "--langdef=C" > .ctags.d/"$defc_ctags"
mkdir -p $BUILDDIR/.ctags.d
echo "--langdef=C" > $BUILDDIR/.ctags.d/"$defc_ctags"

"${CTAGS}" --version > /dev/null
(cd $BUILDDIR; "${CTAGS}" --version;) > /dev/null
status=$?

rm .ctags.d/"$defc_ctags"
rm $BUILDDIR/.ctags.d/"$defc_ctags"
if [ "$remove_ctags_d" = y ]; then
rmdir .ctags.d
rmdir $BUILDDIR/.ctags.d
fi

exit "$status"

0 comments on commit 50947f7

Please sign in to comment.