1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00
samba-mirror/buildtools/compare_config_h3.sh
Andrew Bartlett 403dda3c22 build: Add automatic compare of config.h files to recursive waf build
This uses the fact that we have both build systems running at the same time.

The krb5 checks are skipped because we typically are comparing internal Heimdal
with the system krb5, so they do not make sense.

The required checks for krb5 are pretty well understood in any case, as
we have a limited set of supported libraries.

Andrew Bartlett
2012-06-01 03:04:27 +02:00

28 lines
595 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 | grep -v -f $EXCEPTIONS | sort > waf-config.h
grep "^.define" $OLD_CONFIG | grep -v -f $EXCEPTIONS | sort > old-config.h
$DIFF old-config.h waf-config.h
rm -f old-config.h waf-config.h