Makefile 700 B

123456789101112131415161718192021222324
  1. SRCS = ghc.el ghc-func.el ghc-doc.el ghc-comp.el ghc-flymake.el \
  2. ghc-command.el ghc-info.el ghc-ins-mod.el ghc-indent.el
  3. EMACS = emacs
  4. DETECT = xemacs
  5. TEMPFILE = temp.el
  6. all: $(TEMPFILE) ghc.el
  7. $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f ghc-compile
  8. rm -f $(TEMPFILE)
  9. detect: $(TEMPFILE) ghc.el
  10. $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f ghc-compile
  11. rm -f $(DETECT)
  12. $(TEMPFILE):
  13. @echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE)
  14. @echo '(defun ghc-compile () (mapcar (lambda (x) (byte-compile-file x)) (list ' >> $(TEMPFILE)
  15. @echo $(SRCS)| sed -e 's/\(ghc[^ ]*\.el\)/"\1"/g' >> $(TEMPFILE)
  16. @echo ')))' >> $(TEMPFILE)
  17. clean:
  18. rm -f *.elc $(TEMPFILE)