org-mode/lisp/Makefile
Achim Gratz 6da2d089b0 move all version strings into org-install.el
* targets.mk: check for release and git version and record this
	into environment variables for use in sub-make invocations; add
	new target "compile-dirty" that does not invoke "make clean" first
	* doc/Makefile, lisp/Makefile: remove git version check, since
	they are now provided by first-level make
	* lisp/Makefile: add insertion of version information into
	org-install.el, have org-install.el depend on LISPF rather than
	LISPC so that autoloads can be produced without compiling
	everything and remove insertion into org.el and re-compilation
	during install; add new target "compile-dirty" to support
	invocation from first-level make
	* lisp/org.el (org-version): remove determination of version
	information, show "N/A" if the information is not provided via
	org-install.el
2012-04-20 21:04:10 +02:00

47 lines
1.4 KiB
Makefile

ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
LISPO = org-install.el
LISPF = $(subst $(LISPO),,$(wildcard *.el))
LISPC = $(LISPF:%el=%elc)
.PHONY: all autoloads compile install clean cleanall clean-install
all \
compile \
compile-dirty: $(LISPC)
autoloads: $(LISPO)
org-install.el: $(LISPF)
$(BATCH) \
--eval "(require 'autoload)" \
--eval '(find-file "$(LISPO)")' \
--eval '(erase-buffer)' \
--eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
--eval '(insert "\n(provide (quote org-install))\n")' \
--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")' \
--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")' \
--eval '(save-buffer)'
install: $(LISPF) compile autoloads
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
$(CP) $(LISPC) $(LISPF) $(LISPO) $(lispdir)
clean:
$(RM) *.elc
cleanall:
$(RM) *.elc $(LISPO)
clean-install:
if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
$(RM) $(lispdir)/org*.el* $(lispdir)/ob*.el*
.SUFFIXES: # we don't need default suffix rules
.SUFFIXES: .el .elc
.el.elc:
$(ELC) $<