Makefile 1.5 KB

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