1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/buildtools/compare_config_h3.sh
Björn Jacke 86c2d486f2 buildtools: use egrep when we need the "-f patternfile" option
Solaris' default grep doesn't know the -f option

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jul 26 20:49:18 CEST 2012 on sn-devel-104
2012-07-26 20:49:17 +02:00

28 lines
597 B
Bash
Executable File

#!/bin/sh
# compare the generated config.h from a waf build with existing samba
# build
OLD_CONFIG=source3/include/autoconf/config.h
if test "x$1" != "x" ; then
OLD_CONFIG=$1
fi
NEW_CONFIG=bin/default/include/config.h
if test "x$2" != "x" ; then
NEW_CONFIG=$2
fi
EXCEPTIONS=`dirname $0`/compare_config_h3-exceptions.grep
if test "x$DIFF" = "x" ; then
DIFF="comm -23"
fi
grep "^.define" $NEW_CONFIG | egrep -v -f $EXCEPTIONS | sort > waf-config.h
grep "^.define" $OLD_CONFIG | egrep -v -f $EXCEPTIONS | sort > old-config.h
$DIFF old-config.h waf-config.h
rm -f old-config.h waf-config.h