Jamfile.v2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright John Maddock 2008. Use, modification, and distribution are
  2. # subject to the Boost Software License, Version 1.0. (See accompanying
  3. # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. import os ;
  5. import common ;
  6. import modules ;
  7. import regex ;
  8. inkscape_global = [ modules.peek : INKSCAPE ] ;
  9. if $(inkscape_global)
  10. {
  11. inkscape = $(inkscape_global) ;
  12. ECHO "Using the INKSCAPE environment variable to set inkscape to: " $(inkscape) ;
  13. }
  14. else if [ os.name ] = NT
  15. {
  16. inkscape_reg = [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\svgfile\\shell\\Inkscape\\command" ] ;
  17. inkscape_parts = [ regex.split $(inkscape_reg) "\"%1" ] ;
  18. inkscape = $(inkscape_parts[1]) ;
  19. ECHO "Using the Windows registry to set the Inkscape path to: " $(inkscape) ;
  20. ECHO "If that's not correct, try setting the INKSCAPE environment " ;
  21. ECHO "variable to the correct path and executable file name." ;
  22. }
  23. else
  24. {
  25. inkscape = "inkscape" ;
  26. ECHO "No inkscape path specified, defaulting to \"inkscape\"." ;
  27. ECHO "If that's not correct, try setting the INKSCAPE environment " ;
  28. ECHO "variable to the correct path and executable file name." ;
  29. }
  30. #make inkscape.check : : @inkscape-rule ;
  31. actions inkscape-rule
  32. {
  33. $(inkscape) --version > inkscape.version
  34. }
  35. actions svg2png
  36. {
  37. $(inkscape) -d 120 -e $(<) $(>)
  38. }
  39. for local source in [ glob *.svg ]
  40. {
  41. path-constant p : $(source:B).png ;
  42. make $(p) : $(source) : @svg2png ;
  43. }