libdb/dist/validate/s_chk_osdir

31 lines
478 B
Text
Raw Normal View History

#!/bin/sh -
#
# $Id$
#
# Check to make sure the @OSDIR@ entries in the Makefile are correct.
d=../..
[ -f $d/LICENSE ] || {
echo 'FAIL: cannot find source distribution directory.'
exit 1
}
s=$d/src
t1=__1
t2=__2
egrep '/@OSDIR@/' $d/dist/Makefile.in | sed -e 's/@.*/.c/' > $t1
(cd $s/os_windows && ls os_*.c) > $t2
cmp $t1 $t2 || {
echo "Makefile @OSDIR@ mismatch with os_windows files"
echo "<<< Makefile >>> os_windows"
diff $t1 $t2
exit 1
}
rm -f $t1 $t2
exit 0