@echo off
@echo configuring ../%1
makedir ../%1
if "%3" == "" goto src
redir -o makedos.tmp sed -e 's!@SRCDIR@!%3/%1!' common.sed
goto src1
:src
redir -o makedos.tmp sed -e 's!@SRCDIR@!.!' common.sed
:src1
redir -oa makedos.tmp cat %2.sed
if "%3" == "" goto src2
redir -o makefile.tmp sed -f makedos.tmp %3/%1/Makefile.in
goto src3
:src2
redir -o makefile.tmp sed -f makedos.tmp ../%1/Makefile.in
:src3
update makefile.tmp ../%1/Makefile
