Advertisement
rockdrilla

understanding normal and order-only prerequisites

Oct 2nd, 2014
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.46 KB | None | 0 0
  1. #edit: don't copy highlighted text, use 'raw paste data' textbox
  2.  
  3. MAKEFLAGS +=--no-print-directory -Rr
  4.  
  5. c_target              = "\033[01;31m"
  6. c_requisite_normal    = "\033[01;32m"
  7. c_requisite_orderonly = "\033[01;33m"
  8. c_reset               = "\033[00m"
  9.  
  10. T=a b c d e f g
  11. .PHONY: $(T)
  12. $(T):
  13.     @echo \
  14. $(c_target) '>' $@ \
  15. $(c_requisite_normal)$(if $+,':' $+) \
  16. $(c_requisite_orderonly)$(if $PIPE>,'|' $PIPE>) \
  17. $(c_reset)
  18.  
  19. .DEFAULT: a
  20. d: g
  21. c: f
  22. a: b c | d e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement