Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. all = example.rb example.php example.c example.java example.scm example.pl example.js
  2. all: $(all)
  3. example.rb: example.eruby
  4. erubis --pi -l ruby example.eruby > example.rb
  5. example.php: example.ephp
  6. erubis --pi -l php example.ephp > example.php
  7. example.c: example.ec
  8. erubis --pi -bl c example.ec > example.c
  9. example.java: example.ejava
  10. erubis --pi -bl java example.ejava > example.java
  11. example.scm: example.escheme
  12. erubis --pi -l scheme --func=display example.escheme > example.scm
  13. # erubis --pi -l scheme example.escheme > example.scm
  14. example.pl: example.eperl
  15. erubis --pi -l perl example.eperl > example.pl
  16. example.js: example.ejs
  17. erubis --pi -l javascript example.ejs > example.js
  18. ###----------
  19. src = example.eruby example.ephp example.ec example.ejava example.escheme example.eperl example.ejs Makefile
  20. clean:
  21. rm -f `ruby -e 'puts(Dir.glob("*.*") - %w[$(src)])'`
  22. # rm -f $(all)
  23. compile: example.bin example.class
  24. example.bin: example.c
  25. cc -o example.bin example.c
  26. example.class: example.java
  27. jikes example.java
  28. output: $(all) example.bin example.class
  29. erubis --pi example.eruby > example.ruby.result
  30. #ruby example.rb > example.ruby.result
  31. php example.php > example.php.result
  32. ./example.bin '<aaa>' 'b&b' '"ccc"' > example.c.result
  33. java example > example.java.result
  34. gosh example.scm > example.scm.result
  35. #guile example.scm > example.scm.result
  36. perl example.pl > example.pl.result