org-mode/lisp/Makefile
Achim Gratz 0c9ba74955 provide for .el files that should be installed, but not compiled
* lisp/Makefile: Add LISPN (empty by default) which is used to filter
  out files from LISPC.  This means that install will not fail due to
  a corresponding .elc missing.  This might become useful if lisp
  source files set "no-byte-compile: t" for whatever reason.
2012-07-15 18:31:37 +02:00

49 lines
1.2 KiB
Makefile

.NOTPARALLEL: # always run this make serially
.SUFFIXES: # we don't need default suffix rules
ifeq ($(MAKELEVEL), 0)
$(error This make needs to be started as a sub-make from the toplevel directory.)
endif
LISPV = org-version.el
LISPI = org-install.el
LISPA = $(LISPV) $(LISPI)
LISPF = $(filter-out $(LISPA),$(wildcard *.el))
LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
.PHONY: all compile compile-dirty \
autoloads \
install clean cleanauto cleanall clean-install
# do not clean here, done in toplevel make
all compile:: autoloads
all compile compile-dirty:: $(LISPI) $(LISPV)
$(ELCDIR)
autoloads: cleanauto $(LISPI) $(LISPV)
$(LISPV): $(LISPF)
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_VERSION)
$(LISPI): $(LISPV) $(LISPF)
@echo "org-install: $(ORGVERSION) ($(GITVERSION))"
@$(RM) $(@)
@$(MAKE_ORG_INSTALL)
install: $(LISPF) compile
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
$(MKDIR) $(DESTDIR)$(lispdir) ; \
fi ;
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
cleanauto clean cleanall::
$(RM) $(LISPA) $(LISPA:%el=%elc)
clean cleanall::
$(RM) *.elc
clean-install:
if [ -d $(DESTDIR)$(lispdir) ] ; then \
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
fi ;