#!/bin/csh # Shave and a Haircut # (c) 2019 Epic Games # US Patent 6720962 echo "mkSDKincludes:status: creating sample include files" cp shaveSDK.h shaveSDKTYPES.h shaveSDKFUNCS.h shaveSDKCALLBACKS.h shaveEngine.h sample/include # # Use the ALTERNATE_DEFS section of shaveSDKALTNAMES.h to create a file of # sed commands to convert SDK func names to SDK2 names # sed -e '1,/^#ifdef ALTERNATE_DEFS/d' -e '/#endif/,$d' -e 's/[ ][ ]*/ /g' -e 's/^ //' < shaveSDKALTNAMES.h \ | grep '^#define' \ | sed -e 's/^#define \([^ ]*\) \([^ ]*\) *$/s\/\1[ ]*(\/\2(\//' \ > tempEdits # # Create the shaveSDKFUNCS2.h file using those edits # sed -f tempEdits < shaveSDKFUNCS.h >sample/include/shaveSDKFUNCS2.h # # Create the shaveSDKCALLBACKS2.h file using those edits # sed -f tempEdits < shaveSDKCALLBACKS.h >sample/include/shaveSDKCALLBACKS2.h rm -f tempEdits