summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/dist/s_tags
diff options
context:
space:
mode:
authorRamon Fernandez <ramon@mongodb.com>2016-09-26 08:10:04 -0400
committerRamon Fernandez <ramon@mongodb.com>2016-09-26 08:10:04 -0400
commit79d9b3ab5ce20f51c272b4411202710a082d0317 (patch)
tree02896bc295ffcd4a0201bda0663160bc22de2c2a /src/third_party/wiredtiger/dist/s_tags
parent7026ff8dbc62b9649e8be1793d3273d9cc162174 (diff)
downloadmongo-65130e6a6cc4193431d089871f57416fbb47ec00.tar.gz
Import wiredtiger: 9cf2f89d6d95e1de797f05ab1fef28695f8bae7b from branch mongodb-3.2r3.2.10-rc2r3.2.10
ref: bb18c43915..9cf2f89d6d for: 3.2.10 WT-2864 Reconfiguring the checkpoint server can lead to hangs WT-2874 Change test_compact01 to avoid eviction WT-2918 The dist scripts create C files s_whitespace complains about WT-2919 Don't mask error returns from style checking scripts WT-2921 Reduce the WT_SESSION hazard_size when possible WT-2923 heap-use-after-free on address in compaction WT-2924 Ensure we are doing eviction when threads are waiting for it WT-2925 WT_THREAD_PANIC_FAIL is a WT_THREAD structure flag WT-2926 WT_CONNECTION.reconfigure can attempt unlock of not-locked lock WT-2928 Eviction failing to switch queues can lead to starvation
Diffstat (limited to 'src/third_party/wiredtiger/dist/s_tags')
-rwxr-xr-xsrc/third_party/wiredtiger/dist/s_tags45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/third_party/wiredtiger/dist/s_tags b/src/third_party/wiredtiger/dist/s_tags
index faed132d05b..edb1567992c 100755
--- a/src/third_party/wiredtiger/dist/s_tags
+++ b/src/third_party/wiredtiger/dist/s_tags
@@ -1,41 +1,43 @@
#! /bin/sh
-# Build tags file.
-#
-t=__a.c
-trap 'rm -f $t; exit 0' 0 1 2 3 13 15
+# Build tags files.
+trap 'rm -f tags' 0 1 2 3 13 15
# Skip this when building release packages
test -n "$WT_RELEASE_BUILD" && exit 0
+# We have to be in the dist directory to run.
+test -f s_tags || {
+ echo "s_tags requires dist be the current working directory"
+ exit 1
+}
+
# We require ctags which may not be installed.
type ctags > /dev/null 2>&1 || {
- echo 'skipped: ctags not found' > $t
+ echo 'skipped: ctags not found'
exit 0
}
# Test to see what flags this ctags binary supports.
-# Use the -d, -t and -w flags to ctags if available.
flags=""
-echo "f() { int a; }" > $t
for i in -d -t -w --language-force=C; do
- if ctags $i $t 2>/dev/null; then
+ if ctags $i ../src/conn/api_strerror.c 2>/dev/null; then
flags="$i $flags"
fi
done
-# Generate a tags file for the build directory
-(cd ../build_posix
-rm -f tags
-ctags $flags ../src/include/*.in ../src/*/*.[chi] 2>/dev/null)
+# Generate a tags file for the standard build directory.
+(cd ../build_posix &&
+rm -f tags &&
+ctags $flags ../src/include/*.in `find ../src -name '*.[chi]'` 2>/dev/null)
-# Put the shared tags file in the include directory, it's at the same level in
-# the tree as the other source files.
-(cd ../src/include
-rm -f tags
-ctags $flags ../include/*.in ../*/*.[chi] 2>/dev/null)
+# Generate a tags file for the src/include directory.
+(cd ../src/include &&
+rm -f tags &&
+ctags $flags ../include/*.in `find .. -name '*.[chi]'` 2>/dev/null)
-# Link the tags file into place if we're at the right level.
+# Link the tags file into place in the standard source directories, if we're
+# at the right level.
link_tag()
{
if test -e ../include/tags; then
@@ -46,8 +48,9 @@ link_tag()
# Link to the tags file from standard build and source directories.
dirs="`python -c 'import dist; dist.print_source_dirs()'` ../src/os_win"
for i in $dirs; do
- if expr "$i" : ".*/include" > /dev/null; then
- continue
- fi
+ expr "$i" : ".*/include" > /dev/null && continue
+
(cd $i && link_tag)
done
+
+exit 0