1#!/bin/sh
2#
3# Generate swigwarn.swg from swigwarn.h
4#
5# Based on the "Lib/swigwarn.swg" target in the original Makefile.in
6#
7echo "/* Automatically generated file containing all the swig warning codes.  */" > ${SCRIPT_OUTPUT_FILE_0}
8echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h'  */" >> ${SCRIPT_OUTPUT_FILE_0}
9echo "/* and use the command 'make Lib/swigwarn.swg' instead.                 */" >> ${SCRIPT_OUTPUT_FILE_0}
10echo >> ${SCRIPT_OUTPUT_FILE_0}; echo >> ${SCRIPT_OUTPUT_FILE_0}
11awk '/#define WARN/{$1="%define"; $2="SWIG"$2; $3=sprintf("%d %%enddef", $3); print $0; next;}\
12      /#/{next;} {print $0}' < ${SCRIPT_INPUT_FILE_0} >> ${SCRIPT_OUTPUT_FILE_0}
13