remove dependencies.mk since it is not needed any more
[org-mode/org-mode-NeilSmithlineMods.git] / lisp / Makefile
blob6ac5447a87f3e505a12a829ab1508856544d7ecc
1 ifeq ($(MAKELEVEL), 0)
2 $(error This make needs to be started as a sub-make from the toplevel directory.)
3 endif
5 GITVERSION = $(shell git describe --abbrev=6 HEAD)
6 GITSTATUS = $(shell git status -uno --porcelain)
7 ifneq ("$(GITSTATUS)", "")
8 GITVERSION := $(GITVERSION).dirty
9 endif
11 LISPO = org-install.el
12 LISPF = $(subst $(LISPO),,$(wildcard *.el))
13 LISPC = $(LISPF:%el=%elc)
15 .PHONY: all autoloads compile install clean cleanall clean-install
17 all compile: $(LISPC)
19 autoloads: $(LISPO)
21 org-install.el: $(LISPC)
22 $(BATCH) \
23 --eval "(require 'autoload)" \
24 --eval '(find-file "$(LISPO)")' \
25 --eval '(erase-buffer)' \
26 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
27 --eval '(insert "\n(provide (quote org-install))\n")' \
28 --eval '(save-buffer)'
30 install: $(LISPF) compile autoloads
31 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
32 $(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
33 -$(SED) -e 's/^\((defconst org-git-version \).*/\1 "$(GITVERSION)"/;' org.el > $(lispdir)/org.el
34 $(MAKE) $(lispdir)/org.elc
36 clean:
37 $(RM) *.elc
39 cleanall:
40 $(RM) *.elc $(LISPO)
42 clean-install:
43 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
44 $(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*
46 .SUFFIXES: # we don't need default suffix rules
47 .SUFFIXES: .el .elc
49 .el.elc:
50 $(ELC) $<