snippet-extractor.jam 708 B

12345678910111213141516171819202122232425
  1. # Boost.Signals2 Library
  2. # Copyright Frank Mori Hess 2009.
  3. # Use, modification and
  4. # distribution is subject to the Boost Software License, Version
  5. # 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. # http://www.boost.org/LICENSE_1_0.txt)
  7. # For more information, see http://www.boost.org
  8. import feature ;
  9. import toolset ;
  10. feature.feature extractor-command : : free dependency ;
  11. toolset.flags snippet-extractor.extract-snippets EXTRACTOR-COMMAND <extractor-command> ;
  12. rule extract-snippets ( target : sources * : properties * )
  13. {
  14. DEPENDS $(target) : [ on $(target) return $(EXTRACTOR-COMMAND) ] ;
  15. }
  16. actions extract-snippets bind EXTRACTOR-COMMAND
  17. {
  18. $(EXTRACTOR-COMMAND[1]) "$(<:D)" $(>)
  19. }