jamroot.jam 1.5 KB

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