From b09b3ac8f88d7b89501193efca3615518218d6f1 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 14 Feb 2008 14:15:07 +0100 Subject: Create symbols to export in libtdb dynamically from tdb.h. This adds a general mechanism to create version-scripts for linking shared libraries from one or several header files, similar to mkproto.sh/awk. Michael (This used to be commit 65817703c49a7410f4f0c8b46494ede6169d9fa6) --- source3/script/mksyms.awk | 76 +++++++++++++++++++++++++++++++++++++++++++++++ source3/script/mksyms.sh | 45 ++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 source3/script/mksyms.awk create mode 100755 source3/script/mksyms.sh (limited to 'source3/script') diff --git a/source3/script/mksyms.awk b/source3/script/mksyms.awk new file mode 100644 index 00000000000..a30bea4d340 --- /dev/null +++ b/source3/script/mksyms.awk @@ -0,0 +1,76 @@ +# +# mksyms.awk +# +# Extract symbols to export from C-header files. +# output in version-script format for linking shared libraries. +# +# Copyright (C) 2008 Micheal Adam +# +BEGIN { + inheader=0; + current_file=""; + print "#" + print "# This file is automatically generated with \"make symbols\". DO NOT EDIT " + print "#" + print "{" + print "\tglobal:" +} + +END { + print"" + print "\tlocal: *;" + print "};" +} + +{ + if (FILENAME!=current_file) { + print "\t\t# The following definitions come from",FILENAME + current_file=FILENAME + } + if (inheader) { + if (match($0,"[)][ \t]*[;][ \t]*$")) { + inheader = 0; + } + next; + } +} + +/^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_]/ { + next; +} + +/^extern[ \t]+[^()]+[;][ \t]*$/ { + gsub(/[^ \t]+[ \t]+/, ""); + sub(/[;][ \t]*$/, ""); + printf "\t\t%s;\n", $0; + next; +} + +# look for function headers: +{ + gotstart = 0; + if ($0 ~ /^[A-Za-z_][A-Za-z0-9_]+/) { + gotstart = 1; + } + if(!gotstart) { + next; + } +} + +/[_A-Za-z0-9]+[ \t]*[(].*[)][ \t]*;[ \t]*$/ { + sub(/[(].*$/, ""); + gsub(/[^ \t]+[ \t]+/, ""); + gsub(/^[*]/, ""); + printf "\t\t%s;\n",$0; + next; +} + +/[_A-Za-z0-9]+[ \t]*[(]/ { + inheader=1; + sub(/[(].*$/, ""); + gsub(/[^ \t]+[ \t]+/, ""); + gsub(/^[*]/, ""); + printf "\t\t%s;\n",$0; + next; +} + diff --git a/source3/script/mksyms.sh b/source3/script/mksyms.sh new file mode 100755 index 00000000000..637ec5027c4 --- /dev/null +++ b/source3/script/mksyms.sh @@ -0,0 +1,45 @@ +#! /bin/sh + +# +# mksyms.sh +# +# Extract symbols to export from C-header files. +# output in version-script format for linking shared libraries. +# +# This is the shell warpper for the mksyms.awk core script. +# +# Copyright (C) 2008 Micheal Adam +# + +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_COLLATE=C; export LC_COLLATE + +if [ $# -lt 2 ] +then + echo "Usage: $0 awk output_file header_files" + exit 1 +fi + +awk="$1" +shift + +symsfile="$1" +shift +symsfile_tmp="$symsfile.$$.tmp~" + +proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `" + +echo creating $symsfile + +mkdir -p `dirname $symsfile` + +${awk} -f script/mksyms.awk $proto_src > $symsfile_tmp + +if cmp -s $symsfile $symsfile_tmp 2>/dev/null +then + echo "$symsfile unchanged" + rm $symsfile_tmp +else + mv $symsfile_tmp $symsfile +fi -- cgit From 1f635e3888d51641a414f84f7402f249de287a74 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 25 Feb 2008 11:34:44 +0100 Subject: make test: pass --option=torture:sharedelay=100000 to samba4 smbtorture BASE-DEFER_OPEN is now more strict with incorrect timing metze (This used to be commit 9b761062df80c45bf2b76af071131d0c78e94a09) --- source3/script/tests/test_posix_s3.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/script') diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh index 91863b7a6bf..7b4c0224ba5 100755 --- a/source3/script/tests/test_posix_s3.sh +++ b/source3/script/tests/test_posix_s3.sh @@ -54,6 +54,8 @@ skipped="$skipped RAW-SFILEINFO" echo "WARNING: Skipping tests $skipped" +ADDARGS="$ADDARGS --option=torture:sharedelay=100000" + failed=0 for t in $tests; do if [ ! -z "$start" -a "$start" != $t ]; then -- cgit From 32dd3411195e3a0d5b2b05bc353e8045e07b6e5a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 25 Feb 2008 17:24:52 +0100 Subject: Fix build on some systems : don't pass libraries to mkproto.awk Currently, some static libraries have gone into object lists that are also passed to make proto. (This should probably be changed...) Then some awk versions fail when passed an non- existing lib/libtdb.a e.g.. This patch changes mkproto.sh to exclude \.a files from the list of files to process. Michael (This used to be commit 826b9ab07b58ca39350cca921002a4213ce7c7c9) --- source3/script/mkproto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index e46e73e3e90..8561f42dff0 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -25,7 +25,7 @@ header="$1" shift headertmp="$header.$$.tmp~" -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'tdb/|wrapped|modules/getdate'`" +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'tdb/|wrapped|modules/getdate' | egrep -v '\.a$'`" echo creating $header -- cgit From 379fa9baaec5094b6509821d0c97f1f92cc3afb8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Feb 2008 16:01:34 +0100 Subject: make idl: Only compile idl files newer than the output to be generated. Fix "if" condition in build_idl.sh to not always evaluate as false. Michael (This used to be commit 79c199d16e565eabd9fd971247f8df62689bb92a) --- source3/script/build_idl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/build_idl.sh b/source3/script/build_idl.sh index 7aaddc70c73..39a63573b90 100755 --- a/source3/script/build_idl.sh +++ b/source3/script/build_idl.sh @@ -23,7 +23,7 @@ for f in ${IDL_FILES}; do basename=`basename $f .idl` ndr="librpc/gen_ndr/ndr_$basename.c" - if [ -f $ndr ] && false; then + if [ -f $ndr ] ; then if [ "x`find librpc/idl/$f -newer $ndr -print`" = "xlibrpc/idl/$f" ]; then list="$list librpc/idl/$f" fi -- cgit From e1b32594c70ee57f16c84adb7910aa5c84a560f8 Mon Sep 17 00:00:00 2001 From: Karolin Seeger Date: Thu, 28 Feb 2008 15:49:57 +0100 Subject: Remove smbmount. Karolin (This used to be commit 5fbd98f7065268ae134108310119078ad8f62322) --- source3/script/installbin.sh.in | 9 --------- source3/script/installman.sh | 1 - source3/script/uninstallbin.sh.in | 6 ------ 3 files changed, 16 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh.in b/source3/script/installbin.sh.in index 59a6c31ca88..c607d9e4450 100755 --- a/source3/script/installbin.sh.in +++ b/source3/script/installbin.sh.in @@ -19,15 +19,6 @@ for p in $*; do fi cp $p $DESTDIR/$BINDIR/ chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 - - # this is a special case, mount needs this in a specific location - if [ $p2 = smbmount ]; then - if [ ! -d $DESTDIR/@rootsbindir@ ]; then - mkdir $DESTDIR/@rootsbindir@ - fi - echo "Creating sym link $DESTDIR/@rootsbindir@/mount.smbfs to $BINDIR/$p2 " - ln -sf $BINDIR/$p2 $DESTDIR/@rootsbindir@/mount.smbfs - fi done diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 7edc707ab07..869ce6ee38e 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -49,7 +49,6 @@ for lang in $langs; do # Check if this man page if required by the configured feature set case "${MP_BASENAME}" in smbsh.1) test -z "${SMBWRAPPER}" && continue ;; - smbmnt.8|smbmount.8|smbumount.8) test -z "${SMBMOUNT_PROGS}" && continue ;; *) ;; esac diff --git a/source3/script/uninstallbin.sh.in b/source3/script/uninstallbin.sh.in index e1bbf6ecb13..8064db8d95b 100755 --- a/source3/script/uninstallbin.sh.in +++ b/source3/script/uninstallbin.sh.in @@ -26,12 +26,6 @@ for p in $*; do echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? " fi fi - - # this is a special case, mount needs this in a specific location - if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then - echo "Removing $DESTDIR/sbin/mount.smbfs " - rm -f "$DESTDIR/@rootsbindir@/sbin/mount.smbfs" - fi done -- cgit From af3e746d9e79f96d004b0f50760b4918ce57eb3a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 29 Feb 2008 13:17:18 +0100 Subject: Revert "make idl: Only compile idl files newer than the output to be generated." This reverts commit 79c199d16e565eabd9fd971247f8df62689bb92a. Revert this until pidl is capable of doing decent dependency tracking itself (importing types from imported idls). Michael (This used to be commit 1fb69ad1f5c79dd77f73a5fee266e1e363e6974d) --- source3/script/build_idl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/build_idl.sh b/source3/script/build_idl.sh index 39a63573b90..7aaddc70c73 100755 --- a/source3/script/build_idl.sh +++ b/source3/script/build_idl.sh @@ -23,7 +23,7 @@ for f in ${IDL_FILES}; do basename=`basename $f .idl` ndr="librpc/gen_ndr/ndr_$basename.c" - if [ -f $ndr ] ; then + if [ -f $ndr ] && false; then if [ "x`find librpc/idl/$f -newer $ndr -print`" = "xlibrpc/idl/$f" ]; then list="$list librpc/idl/$f" fi -- cgit