@echo off

if "%WATCOM%" == "" goto SetEnv
if not exist %DOSDIR%\BIN\VFDUTIL.COM goto SetEnv
VFDUTIL /T WFC.EXE /T WFL.EXE
if errorlevel 1 goto SetEnv
goto End

:SetEnv
echo Open Watcom Fortran Build Environment
SET PATH=C:\DEVEL\WATCOMF\BINW;%PATH%
SET INCLUDE=C:\DEVEL\WATCOMF\H;%INCLUDE%
SET FINCLUDE=C:\DEVEL\WATCOMF\SRC\FORTRAN\DOS;%FINCLUDE%
SET FINCLUDE=C:\DEVEL\WATCOMF\SRC\FORTRAN;%FINCLUDE%
SET WATCOM=C:\DEVEL\WATCOMF
SET EDPATH=C:\DEVEL\WATCOMF\EDDAT
SET WIPFC=C:\DEVEL\WATCOMF\WIPFC

:End