diff options
Diffstat (limited to 'source3/script')
-rw-r--r-- | source3/script/mksyms.awk | 3 | ||||
-rwxr-xr-x | source3/script/mksyms.sh | 34 |
2 files changed, 8 insertions, 29 deletions
diff --git a/source3/script/mksyms.awk b/source3/script/mksyms.awk index dfe51dba7f..a30bea4d34 100644 --- a/source3/script/mksyms.awk +++ b/source3/script/mksyms.awk @@ -9,6 +9,9 @@ BEGIN { inheader=0; current_file=""; + print "#" + print "# This file is automatically generated with \"make symbols\". DO NOT EDIT " + print "#" print "{" print "\tglobal:" } diff --git a/source3/script/mksyms.sh b/source3/script/mksyms.sh index 673c77a3cf..51d3fbd999 100755 --- a/source3/script/mksyms.sh +++ b/source3/script/mksyms.sh @@ -15,50 +15,26 @@ LANG=C; export LANG LC_ALL=C; export LC_ALL LC_COLLATE=C; export LC_COLLATE -if [ $# -lt 3 ] +if [ $# -lt 2 ] then - echo "Usage: $0 awk versionfile output_file header_files" + echo "Usage: $0 awk output_file header_files" exit 1 fi awk="$1" shift -versionfile="$1" -shift - symsfile="$1" shift symsfile_tmp="$symsfile.$$.tmp~" -libname=`basename $symsfile | cut -d '.' -f1` -verline=`grep $libname $versionfile` -majver=`echo -n "$verline" | cut -d ':' -f2` -minver=`echo -n "$verline" | cut -d ':' -f3` -upname=`echo -n "$libname" | sed -e 's/^lib//' | tr '[a-z]' '[A-Z]'` -symver="${upname}_${majver}.${minver}" - -symsext=`basename $symsfile | cut -d '.' -f2-` - -if test x"$symsext" = x"version.syms"; then - echo "creating $symsfile for $symver" -else - echo "creating $symsfile" - symver="# no symbol versioning" -fi - proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `" -mkdir -p `dirname $symsfile` +echo creating $symsfile -cat > $symsfile_tmp <<_ACEOF -# -# This file is automatically generated with "$0". DO NOT EDIT -# -$symver -_ACEOF +mkdir -p `dirname $symsfile` -${awk} -f `dirname $0`/mksyms.awk $proto_src >> $symsfile_tmp +${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp if cmp -s $symsfile $symsfile_tmp 2>/dev/null then |