2011-11-13 05:53:12 -05:00
ORG-INSTALL = $( 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)'
- i n c l u d e l o c a l . m k # optional local customization
.NOTPARALLEL : # always run this make serially
2011-11-13 05:07:21 -05:00
.SUFFIXES : # we don't need default suffix rules
2011-07-17 08:49:43 -04: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 16:49:24 -04:00
LISPO = org-install.el
LISPF = $( subst $( LISPO) ,,$( wildcard *.el) )
LISPC = $( LISPF:%el= %elc)
2011-11-13 05:07:21 -05:00
.PHONY : all compile compile -dirty autoloads install clean cleanall clean -install
2011-07-16 16:49:24 -04:00
2011-11-06 11:53:45 -05:00
a l l \
c o m p i l e \
2011-11-13 05:53:12 -05:00
compile-dirty : cleanauto
$( ELCDIR)
2011-07-16 16:49:24 -04:00
autoloads : $( LISPO )
2011-11-06 11:53:45 -05:00
org-install.el : $( LISPF )
2011-11-13 05:53:12 -05:00
$( ORG-INSTALL)
2011-07-16 16:49:24 -04:00
install : $( LISPF ) compile autoloads
2011-07-17 08:49:43 -04:00
if [ ! -d $( lispdir) ] ; then $( MKDIR) $( lispdir) ; else true; fi ;
2011-07-16 16:49:24 -04:00
$( CP) $( LISPC) $( LISPF) $( LISPO) $( lispdir)
clean :
2011-07-18 11:55:23 -04:00
$( RM) *.elc
2011-07-16 16:49:24 -04:00
2011-11-13 05:53:12 -05:00
cleanauto :
$( RM) $( LISPO) $( LISPO:%el= %elc)
2011-07-16 16:49:24 -04:00
cleanall :
2011-07-18 11:55:23 -04:00
$( RM) *.elc $( LISPO)
clean-install :
if [ ! -d $( lispdir) ] ; then $( MKDIR) $( lispdir) ; else true; fi ;
$( RM) $( lispdir) /org*.el* $( lispdir) /ob*.el*