move all version strings into org-install.el
[org-mode.git] / lisp / Makefile
blob6b67392490deb399b347a3c7036206d587e8ff3b
1 ifeq ($(MAKELEVEL), 0)
2 $(error This make needs to be started as a sub-make from the toplevel directory.)
3 endif
5 LISPO = org-install.el
6 LISPF = $(subst $(LISPO),,$(wildcard *.el))
7 LISPC = $(LISPF:%el=%elc)
9 .PHONY: all autoloads compile install clean cleanall clean-install
11 all \
12 compile \
13 compile-dirty: $(LISPC)
15 autoloads: $(LISPO)
17 org-install.el: $(LISPF)
18 $(BATCH) \
19 --eval "(require 'autoload)" \
20 --eval '(find-file "$(LISPO)")' \
21 --eval '(erase-buffer)' \
22 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
23 --eval '(insert "\n(provide (quote org-install))\n")' \
24 --eval '(insert "\n(defconst org-release \"$(ORGVERSION)\"\n \"The release version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
25 --eval '(insert "\n(defconst org-git-version \"$(GITVERSION)\"\n \"The Git version of org-mode. Inserted by installing org-mode\n or when a release is made.\")\n")' \
26 --eval '(save-buffer)'
28 install: $(LISPF) compile autoloads
29 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
30 $(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
32 clean:
33 $(RM) *.elc
35 cleanall:
36 $(RM) *.elc $(LISPO)
38 clean-install:
39 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
40 $(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*
42 .SUFFIXES: # we don't need default suffix rules
43 .SUFFIXES: .el .elc
45 .el.elc:
46 $(ELC) $<