2011-07-17 12:49:43 +00:00
i f e q ( $( MAKELEVEL ) , 0 )
$( error This make needs to be started as a sub-make from the toplevel directory.)
e n d i f
2011-07-16 20:49:24 +00:00
LISPO = org-install.el
LISPF = $( subst $( LISPO) ,,$( wildcard *.el) )
LISPC = $( LISPF:%el= %elc)
2011-07-18 15:55:23 +00:00
.PHONY : all autoloads compile install clean cleanall clean -install
2011-07-16 20:49:24 +00:00
2011-11-06 16:53:45 +00:00
a l l \
c o m p i l e \
compile-dirty : $( LISPC )
2011-07-16 20:49:24 +00:00
autoloads : $( LISPO )
2011-11-06 16:53:45 +00:00
org-install.el : $( LISPF )
2011-07-16 20:49:24 +00:00
$( 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")' \
2011-11-06 16:53:45 +00:00
--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")' \
2011-07-16 20:49:24 +00:00
--eval '(save-buffer)'
install : $( LISPF ) compile autoloads
2011-07-17 12:49:43 +00:00
if [ ! -d $( lispdir) ] ; then $( MKDIR) $( lispdir) ; else true; fi ;
2011-07-16 20:49:24 +00:00
$( CP) $( LISPC) $( LISPF) $( LISPO) $( lispdir)
clean :
2011-07-18 15:55:23 +00:00
$( RM) *.elc
2011-07-16 20:49:24 +00:00
cleanall :
2011-07-18 15:55:23 +00:00
$( RM) *.elc $( LISPO)
clean-install :
if [ ! -d $( lispdir) ] ; then $( MKDIR) $( lispdir) ; else true; fi ;
$( RM) $( lispdir) /org*.el* $( lispdir) /ob*.el*
2011-07-16 20:49:24 +00:00
.SUFFIXES : # we don't need default suffix rules
.SUFFIXES : .el .elc
.el.elc :
$( ELC) $<