jamroot.jam 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 2002-2005 Vladimir Prus.
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE.txt or copy at
  4. # https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. import os ;
  6. import gcc ;
  7. import property ;
  8. import toolset ;
  9. rule properties-as-path ( properties * )
  10. {
  11. local r ;
  12. for local p in $(properties)
  13. {
  14. if $(p:G) != <action>
  15. {
  16. r += $(p) ;
  17. }
  18. }
  19. return [ property.as-path
  20. [ property.remove incidental : $(r) ] ] ;
  21. }
  22. toolset.flags yfc-compile KNOWN-PROPERTIES : <toolset> <optimization> ;
  23. toolset.flags yfc-link KNOWN-PROPERTIES : <toolset> <optimization> ;
  24. rule yfc-compile ( target : sources * : property-set * )
  25. {
  26. PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
  27. }
  28. actions yfc-compile
  29. {
  30. echo $(PROPERTIES) > $(<)
  31. echo $(>) >> $(<)
  32. }
  33. rule yfc-link ( target : sources * : property-set * )
  34. {
  35. PROPERTIES on $(target) = [ properties-as-path $(property-set) ] ;
  36. }
  37. actions yfc-link
  38. {
  39. echo $(PROPERTIES) > $(<)
  40. echo $(>) >> $(<)
  41. }
  42. if [ os.name ] = VMS
  43. {
  44. actions yfc-compile
  45. {
  46. PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
  47. PIPE WRITE SYS$OUTPUT "$(>:J= ",")" | APPEND /NEW SYS$INPUT $(<:W)
  48. }
  49. actions yfc-link
  50. {
  51. PIPE WRITE SYS$OUTPUT "$(PROPERTIES)" | TYPE SYS$INPUT /OUT=$(<:W)
  52. OPEN /APPEND FOUT $(<:W)
  53. WRITE FOUT "$(>:J= ",")"
  54. CLOSE FOUT
  55. }
  56. }
  57. IMPORT $(__name__) : yfc-compile yfc-link : : yfc-compile yfc-link ;