gen_ifl_wrap.bat 894 B

12345678910111213141516171819202122232425
  1. @echo off
  2. setlocal enableDelayedExpansion
  3. REM this genereates the pbs_ifl_wrap.c file.
  4. if exist "..\..\..\binaries\swig\bin\swig.exe" (
  5. if not exist "pbs_ifl_wrap.c" (
  6. set SWIG_VERSION=""
  7. for /F "tokens=3 USEBACKQ" %%F IN (`..\..\..\binaries\swig\bin\swig.exe -version ^| findstr /l /c:"SWIG Version "`) DO (
  8. set SWIG_VERSION=%%F
  9. )
  10. if "!SWIG_VERSION!"=="" (
  11. echo Failed to find swig version
  12. exit /b 1
  13. )
  14. echo %%module pbs_ifl > pbs_ifl.i
  15. echo %%{ >> pbs_ifl.i
  16. echo #include "..\..\src\include\pbs_ifl.h" >> pbs_ifl.i
  17. echo %%} >> pbs_ifl.i
  18. echo %%include "..\..\src\include\pbs_ifl.h" >> pbs_ifl.i
  19. "..\..\..\binaries\swig\bin\swig.exe" -I..\..\..\binaries\swig\share\swig\!SWIG_VERSION! -I..\..\..\binaries\swig\share\swig\!SWIG_VERSION!\python -python pbs_ifl.i
  20. )
  21. ) else (
  22. copy ..\..\src\lib\Libifl\pbs_ifl_wrap.c .
  23. copy ..\..\src\lib\Libifl\pbs_ifl.py .
  24. )