forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: allow to build ctags even if bash and seq are not available in…
… build environment bash and seq are needed to run optlib2c translator. If they are not available, use pre-translated C code for building ctags executable. Close universal-ctags#794. Using /usr/bin/env is suggested by @jockej.
- Loading branch information
Showing
4 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
#!/bin/sh | ||
misc/dist-test-cases > makefiles/test-cases.mak && \ | ||
autoreconf -vfi && { | ||
for i in `make -f makefiles/list-translator-input.mak`; do | ||
o=${i%.ctags}.c | ||
echo "optlib2c: translating $i to $o" | ||
./misc/optlib2c $i > $o | ||
done | ||
|
||
verify_optlib2c_requirements() | ||
{ | ||
: && | ||
which bash > /dev/null && | ||
which seq > /dev/null | ||
} | ||
|
||
ctags_files=`make -f makefiles/list-translator-input.mak` | ||
misc/dist-test-cases > makefiles/test-cases.mak && \ | ||
if autoreconf -vfi; then | ||
if can_run_optlib2c; then | ||
for i in ${ctags_files}; do | ||
o=${i%.ctags}.c | ||
echo "optlib2c: translating $i to $o" | ||
./misc/optlib2c $i > $o | ||
done | ||
else | ||
for i in ${ctags_files}; do | ||
o=${i%.ctags}.c | ||
echo "use pre-translated file: $o" | ||
done | ||
fi | ||
fi | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# | ||
# optlib2c - a tool translating ctags option file to C | ||
# | ||
|