diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-12-17 18:50:18 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-12-17 18:50:18 -0500 |
commit | 5a8c516e06febf0f4fb4dd5cb3f49646bf8e0a36 (patch) | |
tree | 02c741e21ab776019a43451914d9b4caa019d92d | |
parent | ea8bfd7efc8830895f8c318620b766f17dfb0938 (diff) | |
download | mongo-5a8c516e06febf0f4fb4dd5cb3f49646bf8e0a36.tar.gz |
Stop maintaining a separate Windows version of the file list, generate it
from the POSIX list (it shouldn't change that often).
-rw-r--r-- | SConstruct | 2 | ||||
-rw-r--r-- | build_win/filelist.win (renamed from dist/filelist.win) | 7 | ||||
-rw-r--r-- | dist/filelist | 2 | ||||
-rwxr-xr-x | dist/s_win | 69 |
4 files changed, 61 insertions, 19 deletions
diff --git a/SConstruct b/SConstruct index 4d1e9b5458e..b075afe696a 100644 --- a/SConstruct +++ b/SConstruct @@ -157,7 +157,7 @@ env.Substfile( # # WiredTiger library # -filelistfile = r'dist\filelist.win' +filelistfile = r'build_win\filelist.win' filelist = open(filelistfile) wtsources = [line.strip() for line in filelist diff --git a/dist/filelist.win b/build_win/filelist.win index 6c94666ea40..ce55b6c6d55 100644 --- a/dist/filelist.win +++ b/build_win/filelist.win @@ -1,6 +1,6 @@ -# filelist -- -# List of source files for WiredTiger Windows library. +# List of source files for WiredTiger library. +# filelist -- src/async/async_api.c src/async/async_op.c src/async/async_worker.c @@ -32,8 +32,8 @@ src/btree/bt_ovfl.c src/btree/bt_page.c src/btree/bt_read.c src/btree/bt_ret.c -src/btree/bt_split.c src/btree/bt_slvg.c +src/btree/bt_split.c src/btree/bt_stat.c src/btree/bt_sync.c src/btree/bt_upgrade.c @@ -125,7 +125,6 @@ src/os_win/os_rw.c src/os_win/os_sleep.c src/os_win/os_thread.c src/os_win/os_time.c -src/os_win/os_snprintf.c src/os_win/os_vsnprintf.c src/os_win/os_yield.c src/packing/pack_api.c diff --git a/dist/filelist b/dist/filelist index 8929e0076ba..07469f49311 100644 --- a/dist/filelist +++ b/dist/filelist @@ -1,5 +1,5 @@ # filelist -- -# List of source files for WiredTiger POSIX library. +# List of source files for WiredTiger library. src/async/async_api.c src/async/async_op.c diff --git a/dist/s_win b/dist/s_win index cb889f2ba49..3e6a8162d93 100755 --- a/dist/s_win +++ b/dist/s_win @@ -3,19 +3,62 @@ t=__wt.$$ trap 'rm -f $t' 0 1 2 3 13 15 -egrep '#define|#undef' \ - ../build_posix/config.hin \ - ../build_win/wiredtiger_config.h | - sed 's/^.*#//' | - awk '{print $2}' | - egrep -v '^(LT_OBJDIR|PACKAGE|VERSION)' | - sort | uniq -u > $t +win_config() +{ + f='../build_win/wiredtiger_config.h' + egrep '#define|#undef' \ + ../build_posix/config.hin $f | + sed 's/^.*#//' | + awk '{print $2}' | + egrep -v '^(LT_OBJDIR|PACKAGE|VERSION)' | + sort | uniq -u > $t -test -s $t && { - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo 'Windows #defines missing from build_win/wiredtiger_config.h' - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - cat $t - exit 1 + test -s $t && { + echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" + echo "Windows #defines missing from $f" + echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" + cat $t + exit 1 + } } + +win_filelist() +{ + f='../build_win/filelist.win' + + # Process the files for which there's a Windows-specific version, then + # append Windows-only files. (There aren't yet any POSIX-only files.) + (sed \ + -e 's;os_posix/os_dir.c;os_win/os_dir.c;' \ + -e 's;os_posix/os_dlopen.c;os_win/os_dlopen.c;' \ + -e 's;os_posix/os_dlopen.c;os_win/os_dlopen.c;' \ + -e 's;os_posix/os_dlopen.c;os_win/os_dlopen.c;' \ + -e 's;os_posix/os_errno.c;os_win/os_errno.c;' \ + -e 's;os_posix/os_exist.c;os_win/os_exist.c;' \ + -e 's;os_posix/os_fallocate.c;os_win/os_fallocate.c;' \ + -e 's;os_posix/os_filesize.c;os_win/os_filesize.c;' \ + -e 's;os_posix/os_flock.c;os_win/os_flock.c;' \ + -e 's;os_posix/os_fsync.c;os_win/os_fsync.c;' \ + -e 's;os_posix/os_ftruncate.c;os_win/os_ftruncate.c;' \ + -e 's;os_posix/os_map.c;os_win/os_map.c;' \ + -e 's;os_posix/os_mtx_cond.c;os_win/os_mtx_cond.c;' \ + -e 's;os_posix/os_once.c;os_win/os_once.c;' \ + -e 's;os_posix/os_open.c;os_win/os_open.c;' \ + -e 's;os_posix/os_path.c;os_win/os_path.c;' \ + -e 's;os_posix/os_priv.c;os_win/os_priv.c;' \ + -e 's;os_posix/os_remove.c;os_win/os_remove.c;' \ + -e 's;os_posix/os_rename.c;os_win/os_rename.c;' \ + -e 's;os_posix/os_rw.c;os_win/os_rw.c;' \ + -e 's;os_posix/os_sleep.c;os_win/os_sleep.c;' \ + -e 's;os_posix/os_thread.c;os_win/os_thread.c;' \ + -e 's;os_posix/os_time.c;os_win/os_time.c;' \ + -e 's;os_posix/os_yield.c;os_win/os_yield.c;'; + echo 'src/os_win/os_vsnprintf.c') < filelist | sort > $t + cmp $t $f > /dev/null 2>&1 || + (echo "Building $f" && rm -f $f && cp $t $f) +} + +win_config +win_filelist + exit 0 |