/build/pymake/tests/vpath-directive.mk

http://github.com/zpao/v8monkey · Makefile · 34 lines · 27 code · 7 blank · 0 comment · 0 complexity · 8992d7c54c96e447df76514d14b64a3d MD5 · raw file

  1. ifdef __WIN32__
  2. VPSEP = ;
  3. else
  4. VPSEP = :
  5. endif
  6. $(shell \
  7. mkdir subd1 subd2 subd3; \
  8. printf "reallybaddata" >subd1/foo.in; \
  9. printf "gooddata" >subd2/foo.in; \
  10. printf "baddata" >subd3/foo.in; \
  11. touch subd1/foo.in2 subd2/foo.in2 subd3/foo.in2; \
  12. )
  13. vpath %.in subd
  14. vpath
  15. vpath %.in subd2$(VPSEP)subd3
  16. vpath %.in2 subd0
  17. vpath f%.in2 subd1
  18. vpath %.in2 $(VPSEP)subd2
  19. %.out: %.in
  20. test "$<" = "subd2/foo.in"
  21. cp $< $@
  22. %.out2: %.in2
  23. test "$<" = "subd1/foo.in2"
  24. cp $< $@
  25. all: foo.out foo.out2
  26. test "$$(cat foo.out)" = "gooddata"
  27. @echo TEST-PASS