2
0

version_files.cmd 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ::
  2. :: Generate files usually generated by autoconf
  3. ::
  4. :: NOTE: this script requires gawk - see http://unxutils.sourceforge.net
  5. ::
  6. :: This file is part of the Sofia-SIP package
  7. ::
  8. :: Copyright (C) 2005 Nokia Corporation.
  9. ::
  10. :: Contact: Pekka Pessi <pekka.pessi@nokia.com>
  11. ::
  12. :: This library is free software; you can redistribute it and/or
  13. :: modify it under the terms of the GNU Lesser General Public License
  14. :: as published by the Free Software Foundation; either version 2.1 of
  15. :: the License, or (at your option) any later version.
  16. ::
  17. :: This library is distributed in the hope that it will be useful, but
  18. :: WITHOUT ANY WARRANTY; without even the implied warranty of
  19. :: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. :: Lesser General Public License for more details.
  21. ::
  22. :: You should have received a copy of the GNU Lesser General Public
  23. :: License along with this library; if not, write to the Free Software
  24. :: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  25. :: 02110-1301 USA
  26. ::
  27. @setlocal
  28. @if x%AWK%==x set AWK=mawk
  29. @set VERSION=%AWK% -v BINMODE="rw" -f version.awk
  30. @set AC=..\configure.ac
  31. :: Check that we really have awk
  32. @%AWK% "{ exit(0); }" < NUL >NUL
  33. @if not errorlevel 9009 goto have_awk
  34. @echo *** install %AWK% (mawk or GNU awk) into your PATH ***
  35. @echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
  36. @goto end
  37. :have_awk
  38. for %%f in (config.h ..\libsofia-sip-ua\features\sofia-sip\sofia_features.h) ^
  39. do %VERSION% %AC% OUT=1 %%f.in > %%f
  40. @if errorlevel 1 goto echo *** version_files failed ***
  41. :end
  42. @endlocal