1#!/bin/sh - 2# $Id: s_apiflags,v 12.2 2008/02/18 19:43:25 bostic Exp $ 3# 4# Build the automatically generated API flag #defines. 5 6msgc="/* DO NOT EDIT: automatically built by dist/s_apiflags. */" 7 8b=/tmp/api_flags_binary 9t=/tmp/__db_a 10 11trap 'rm -f $b $t; exit 0' 0 12trap 'rm -f $b $t; exit 1' 1 2 3 13 15 13 14cc api_flags.c -o $b || { 15 echo 's_apiflags: unable to compile api_flags.c' 16 exit 1 17} 18 19(echo "$msgc" 20 $b < api_flags) > $t 21 22f=../dbinc_auto/api_flags.in 23cmp $f $t > /dev/null 2>&1 || 24 (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) 25