@echo off
call confmak.bat bfd bfd %1
update config.sed ../bfd/config.sed
update stub.h ../bfd/stub.h
call updpatch.bat ../bfd/targets.c %1/bfd/targets.c targets.dif targets.ori
call updpatch.bat ../bfd/coff-go32.c %1/bfd/coff-go32.c coff-go32.dif coff-go3.ori
call updpatch.bat ../bfd/opncls.c %1/bfd/opncls.c opncls.dif opncls.ori
call confmak bfd/doc bfd_doc %1
rem the file coffcode.h needs special patching, because it is included
rem with "coffcode.h" and if we compiling in an other directory, we
rem must delete the original one
if exist coffcode.ori goto already_done
cp %1/bfd/coffcode.h coffcode.ori
rm -f %1/bfd/coffcode.h
:already_done
patch --quiet -o coffcode.tmp coffcode.ori coffcode.dif
update coffcode.tmp ../bfd/coffcode.h

