2
0

version.awk 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #! /bin/gawk
  2. #
  3. # This script extracts the version information from configure.ac
  4. # and re-generates win32/config.h and
  5. # libsofia-sip-ua/features/sofia_sip_features.h
  6. #
  7. # --------------------------------------------------------------------
  8. #
  9. # This file is part of the Sofia-SIP package
  10. #
  11. # Copyright (C) 2005 Nokia Corporation.
  12. #
  13. # Contact: Pekka Pessi <pekka.pessi@nokia.com>
  14. #
  15. # This library is free software; you can redistribute it and/or
  16. # modify it under the terms of the GNU Lesser General Public License
  17. # as published by the Free Software Foundation; either version 2.1 of
  18. # the License, or (at your option) any later version.
  19. #
  20. # This library is distributed in the hope that it will be useful, but
  21. # WITHOUT ANY WARRANTY; without even the implied warranty of
  22. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  23. # Lesser General Public License for more details.
  24. #
  25. # You should have received a copy of the GNU Lesser General Public
  26. # License along with this library; if not, write to the Free Software
  27. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  28. # 02110-1301 USA
  29. #
  30. # --------------------------------------------------------------------
  31. #
  32. # Contributor(s): Pekka.Pessi@nokia.com.
  33. #
  34. # Created: Wed Jan 25 15:57:10 2006 ppessi
  35. #
  36. BEGIN { IN=1; OUT=0; }
  37. IN && /^AC_INIT/ { version=$2; gsub(/[\]\[)]/, "", version); }
  38. OUT && /@[A-Z_]+@/ {
  39. gsub(/@PACKAGE_VERSION@/, version);
  40. gsub(/@PACKAGE_BUGREPORT@/, "sofia-sip-devel@lists.sourceforge.net");
  41. gsub(/@PACKAGE_NAME@/, "sofia-sip");
  42. gsub(/@PACKAGE@/, "sofia-sip");
  43. gsub(/@PACKAGE_STRING@/, "sofia-sip");
  44. gsub(/@PACKAGE_TARNAME@/, "sofia-sip");
  45. }
  46. OUT { print; }