elisp-vcs/Makefile
2013-05-12 12:33:40 +02:00

357 lines
10 KiB
Makefile

ifndef HAS_UTIL_MK
include $(HOME)/Documents/mk/util.mk
endif
.PHONY: all elisp-all update
all: elisp-all
elisp-all: ess org-mode gnus dvc auctex reftex
#apel flim semi wanderlust
update: updaterepos
$(call include-once,$(MK_DIR)/vcs.mk)
$(call include-once,$(MK_DIR)/emacsd-defs.mk)
GIT_DIRS += emacswiki
URL-emacswiki := https://github.com/emacsmirror/emacswiki.org.git
post_init_cmd-emacswiki =\
cd $(@D) &&\
git config core.sparsecheckout &&\
git checkout -b master origin/master
GIT_DIRS += use-package
URL-use-package := https://github.com/jwiegley/use-package.git
GIT_DIRS += yaml-mode
URL-yaml-mode := https://github.com/yoshiki/yaml-mode.git
#GIT_DIRS += apel
URL-apel := http://github.com/wanderlust/apel.git
#GIT_DIRS += semi
URL-semi := http://github.com/wanderlust/semi.git
#GIT_DIRS += flim
URL-flim := http://github.com/wanderlust/flim.git
#GIT_DIRS += wanderlust
URL-wanderlust := http://github.com/wanderlust/wanderlust.git
GIT_DIRS += org-mode
URL-org-mode := http://orgmode.org/org-mode.git
GIT_DIRS += gnus
URL-gnus := http://git.gnus.org/gnus.git
GIT_DIRS += w3
URL-w3 := http://git.sv.gnu.org/r/w3.git
GIT_DIRS += bbdb
URL-bbdb := http://git.savannah.nongnu.org/r/bbdb.git
GIT_DIRS += emacs-jabber
URL-emacs-jabber := git://emacs-jabber.git.sourceforge.net/gitroot/emacs-jabber/emacs-jabber
GIT_DIRS += doxymacs
URL-doxymacs := git://doxymacs.git.sourceforge.net/gitroot/doxymacs/doxymacs
GIT_DIRS += htmlize
URL-htmlize := http://fly.srk.fer.hr/~hniksic/emacs/htmlize.git
SVN_DIRS += ess
URL-ess := https://svn.r-project.org/ESS/trunk
CVS_DIRS += auctex
URL-auctex := :pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex
CVS_DIRS += reftex
URL-reftex := :pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex
# :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
# :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
BZR_DIRS += dvc
URL-dvc := http://bzr.xsteve.at/dvc
$(foreach d,$(HG_DIRS) ,$(call eval-vcs-template,HG_TMPL,$d))
$(foreach d,$(GIT_DIRS),$(call eval-vcs-template,GIT_TMPL,$d))
#$(foreach d,$(GIT_DIRS),$(call info-vcs-template,GIT_TMPL,$d))
$(foreach d,$(BZR_DIRS),$(call eval-vcs-template,BZR_TMPL,$d))
$(foreach d,$(SVN_DIRS),$(call eval-vcs-template,SVN_TMPL,$d))
$(foreach d,$(CVS_DIRS),$(call eval-vcs-template,CVS_TMPL,$d))
# #########################################################################
# auctex
# #########################################################################
.PHONY: auctex
auctex/configure: auctex/autogen.sh auctex/configure.ac
cd $(@D) && ./autogen.sh
auctex/Makefile: auctex/configure Makefile | $(DOT_DIR)/share/texmf/.dir
cd $(@D) && ./configure\
--infodir=$(INFO_DIR)\
--datarootdir=$(DOT_DIR)/share\
--localstatedir=$(DOT_DIR)/var\
--with-lispdir=$(LISP_DIR)\
--with-texmf-dir=$(DOT_DIR)/share/texmf\
auctex: auctex/Makefile
$(MAKE) -C $(DIR-$@) clean
$(MAKE) -C $(DIR-$@) lisp info install\
EMACS="$(EMACS) --eval '(setq vc-handled-backends nil)'"
# #########################################################################
# reftex
# #########################################################################
.PHONY: reftex
cd reftex:
$(MAKE) -C $(DIR-$@) clean
$(MAKE) -C $(DIR-$@) lisp info install\
infodir=$(INFO_DIR)\
lispdir=$(LISP_DIR)/reftex\
EMACS=$(EMACS)
# #########################################################################
# ess
# #########################################################################
.PHONY: ess
ess:
-install-info --info-dir=$(INFO_DIR) --remove $(INFO_DIR)/ess.info
$(MAKE) -C $(DIR-$@) all install\
PREFIX=$(DOT_DIR)\
LISPDIR=$(LISP_DIR)/ess\
ETCDIR=$(LISP_DIR)/ess/etc\
INFODIR=$(INFO_DIR)\
EMACS=$(or $(EMACS_CYGWIN),$(call fixpath-shell,$(EMACS)))
# #########################################################################
# doxymacs
# #########################################################################
.PHONY: doxymacs
doxymacs/configure: doxymacs/bootstrap doxymacs/configure.ac $(MAKEFILE_LIST)
cd $(@D) && ./bootstrap
doxymacs/Makefile: doxymacs/configure Makefile
cd $(@D) && ./configure\
--prefix=$(LISP_DIR)/doxymacs\
--bindir=$(BIN_DIR)\
--with-lispdir=$(LISP_DIR)/doxymacs\
doxymacs: doxymacs/Makefile $(wildcard doxymacs/lisp/*.el)
$(MAKE) -C $(DIR-$@) clean
$(MAKE) -C $(DIR-$@) all install\
EMACS=$(EMACS)
# EMACSFLAGS
# #########################################################################
# gnus
# #########################################################################
.PHONY: gnus
gnus/configure :| gnus/.git
gnus/Makefile: $(MAKEFILE_LIST) gnus/configure
cd $(@D) && ./configure\
--prefix=$(LISP_DIR)/gnus\
--infodir=$(INFO_DIR)\
gnus: gnus/Makefile
$(MAKE) -C $(DIR-$@) clean
$(MAKE) -C $(DIR-$@) all\
EMACS="$(EMACS) --eval '(setq vc-handled-backends nil)'"\
# #########################################################################
# dvc
# #########################################################################
.PHONY: dvc
dvc/configure: $(MAKEFILE_LIST) dvc/configure.ac
cd $(@D) && autoreconf
dvc/Makefile: dvc/configure Makefile
cd $(@D) && ./configure\
--prefix=$(LISP_DIR)/dvc\
--with-lispdir=$(LISP_DIR)/dvc\
--bindir=$(BIN_DIR)\
--infodir=$(INFO_DIR)\
dvc: dvc/Makefile
-install-info --info-dir=$(INFO_DIR) --remove $(INFO_DIR)/dvc.info
$(MAKE) -C $(DIR-$@) clean
$(MAKE) -C $(DIR-$@) all install\
EMACS="$(EMACS) --eval '(setq vc-handled-backends nil)'"\
# #########################################################################
# org-mode
# #########################################################################
.PHONY: org-mode
org-mode:
-install-info --info-dir=$(INFO_DIR) --remove $(INFO_DIR)/org
$(MAKE) -C $(DIR-$@) cleanall\
prefix=$(DOT_DIR)\
infodir=$(INFO_DIR)\
lispdir=$(LISP_DIR)/org-mode\
datadir=$(DOT_DIR)/share/org-mode
$(MAKE) -C $(DIR-$@) install install-info doc\
EMACS="$(EMACS) --eval '(setq vc-handled-backends nil)'"\
prefix=$(DOT_DIR)\
infodir=$(INFO_DIR)\
lispdir=$(LISP_DIR)/org-mode\
datadir=$(DOT_DIR)/share/org-mode
# #########################################################################
# emacs-jabber
# #########################################################################
.PHONY: emacs-jabber
emacs-jabber/configure : $(MAKEFILE_LIST)
cd $(@D) && autoreconf -i
emacs-jabber/Makefile: emacs-jabber/configure
cd $(@D) && ./configure
emacs-jabber: emacs-jabber/Makefile
$(MAKE) -C $(DIR-$@) install\
EMACS=$(EMACS)\
prefix=$(DOT_DIR)\
lispdir=$(LISP_DIR)/jabber\
infodir=$(INFO_DIR)\
libexecdir=$(LISP_DIR)/jabber/bin\
abs_builddir=$(call emacspath,$(ELISP_DIR)/emacs-jabber)
# #########################################################################
# bbdb
# #########################################################################
.PHONY: bbdb
bbdb/configure : $(MAKEFILE_LIST) bbdb/configure.ac
cd $(@D) && autoreconf -i
bbdb/Makefile :\
bbdb/configure\
bbdb/Makefile.in\
bbdb/doc/Makefile.in\
bbdb/lisp/Makefile.in\
bbdb/tex/Makefile.in\
| $(DOT_DIR)/share/texmf/.dir
cd $(@D) && ./configure\
--with-emacs=$(call fixpath-shell,$(EMACS))\
--datarootdir=$(DOT_DIR)\
--with-lispdir=$(LISP_DIR)/bbdb\
--with-texmf-dir=$(DOT_DIR)/share/texmf
bbdb: bbdb/Makefile
$(MAKE) -C $(DIR-$@) install
# #########################################################################
# w3
# #########################################################################
.PHONY: w3
w3/Makefile : $(MAKEFILE_LIST)\
w3/configure
cd $(@D) && ./configure\
--with-emacs=$(call fixpath-shell,$(EMACS))\
--prefix=$(DOT_DIR)\
--with-lispdir=$(LISP_DIR)/w3\
--libexecdir=$(LISP_DIR)/w3/bin\
--datadir=$(DOT_DIR)/share\
--infodir=$(INFO_DIR)\
--with-gnus=$(ELISP_DIR)/gnus\
w3: w3/Makefile
$(MAKE) -C $(DIR-$@) install
# #########################################################################
# yaml-mode
# #########################################################################
.PHONY: yaml-mode
yaml-mode:
$(MAKE) -C $(DIR-$@) install\
EMACS=$(EMACS)\
INSTALLLIBDIR=$(LISP_DIR)\
# #########################################################################
# apel
# #########################################################################
.PHONY: apel
apel:
mv $(DIR-$@)/APEL-CFG $(DIR-$@)/APEL-CFG.org
gsed\
-e '/setq APEL_DIR \"~/s@^[; ]*@@'\
-e '/setq EMU_DIR \"~/s@^[; ]*@@'\
-e 's@^\([^;].*~\)/lib/emacs@\1/.emacs.d@'\
-e 's@^\([^;].*\)/lisp/emu@\1/lisp/apel@'\
$(DIR-$@)/APEL-CFG.org > $(DIR-$@)/APEL-CFG
$(MAKE) -C $(DIR-$@) install\
EMACS=$(EMACS)\
LISPDIR=$(LISP_DIR)
echo diff -u $(DIR-$@)/APEL-CFG.org $(DIR-$@)/APEL-CFG||exit 0&&exit 0
mv $(DIR-$@)/APEL-CFG.org $(DIR-$@)/APEL-CFG
# #########################################################################
# flim
# #########################################################################
.PHONY: flim
flim:
$(MAKE) -C $(DIR-$@) install\
EMACS=$(EMACS)\
PACKAGEDIR=$(DOT_DIR)\
PREFIX=$(LISP_DIR)\
LISPDIR=$(LISP_DIR)
# #########################################################################
# semi
# #########################################################################
.PHONY: semi
semi:
$(MAKE) -C $(DIR-$@) install\
EMACS=$(EMACS)\
PACKAGEDIR=$(DOT_DIR)\
PREFIX=$(LISP_DIR)\
LISPDIR=$(LISP_DIR)
# #########################################################################
# wanderlust
# #########################################################################
.PHONY: wanderlust
wanderlust:
mv $(DIR-$@)/WL-CFG $(DIR-$@)/WL-CFG.org
gsed -e '/setq load-path/,/^ *$$/s@^;*@@'\
-e 's@/usr/local/share/mule/site-@~/.emacs.d/@'\
-e '/wl-\(install\|info\|news\)/s@^;\+@@'\
-e 's@\"ja\" \"en\"@\"en\"@'\
$(DIR-$@)/WL-CFG.org > $(DIR-$@)/WL-CFG
$(MAKE) -C $(DIR-$@) install install-info\
EMACS=$(EMACS)\
LISPDIR=$(LISP_DIR)\
INFODIR=$(INFO_DIR)\
PIXMAPDIR=$(LISP_DIR)/wl/icons
echo diff -u $(DIR-$@)/WL-CFG.org $(DIR-$@)/WL-CFG||exit 0&&exit 0
mv $(DIR-$@)/WL-CFG.org $(DIR-$@)/WL-CFG
# #########################################################################
# include .el pattern rules
# #########################################################################
$(call include-once,$(MK_DIR)/emacsd-rules.mk)
# Local Variables:
# tab-width: 2
# End: