diff --git a/.hgignore b/.hgignore index f49bb81..0c4296d 100644 --- a/.hgignore +++ b/.hgignore @@ -41,6 +41,7 @@ gnus/ ess/ emacswiki/ w3/ +use-package/ doxymacs/Makefile.in doxymacs/aclocal.m4 diff --git a/Makefile b/Makefile index d7d10bb..c1b4179 100644 --- a/Makefile +++ b/Makefile @@ -1,66 +1,305 @@ -GITREPOS :=\ - org-mode\ +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\ + use-package\ + org-mode\ gnus\ bbdb\ + emacs-jabber\ w3\ - apel\ + doxymacs\ + +# apel\ semi\ flim\ wanderlust\ - emacs-jabber\ - doxymacs\ -URL-org-mode := http://orgmode.org/org-mode.git URL-emacswiki := https://github.com/emacsmirror/emacswiki.org.git -URL-gnus := http://git.gnus.org/gnus.git -URL-bbdb := http://git.savannah.nongnu.org/r/bbdb.git -URL-w3 := http://git.sv.gnu.org/r/w3.git +URL-use-package := https://github.com/jwiegley/use-package.git URL-apel := http://github.com/wanderlust/apel.git URL-semi := http://github.com/wanderlust/semi.git URL-flim := http://github.com/wanderlust/flim.git URL-wanderlust := http://github.com/wanderlust/wanderlust.git +URL-org-mode := http://orgmode.org/org-mode.git +URL-gnus := http://git.gnus.org/gnus.git +URL-w3 := http://git.sv.gnu.org/r/w3.git +URL-bbdb := http://git.savannah.nongnu.org/r/bbdb.git URL-emacs-jabber := git://emacs-jabber.git.sourceforge.net/gitroot/emacs-jabber/emacs-jabber URL-doxymacs := git://doxymacs.git.sourceforge.net/gitroot/doxymacs/doxymacs -SVNREPOS :=\ +SVN_DIRS :=\ ess\ URL-ess := https://svn.r-project.org/ESS/trunk -CVSREPOS :=\ + +CVS_DIRS :=\ auctex\ reftex\ -URL-auctex := pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex -URL-reftex := pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex +URL-auctex := :pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex +URL-reftex := :pserver:anonymous@cvs.savannah.gnu.org:/sources/auctex -BZRREPOS :=\ + +BZR_DIRS :=\ dvc\ URL-dvc := http://bzr.xsteve.at/dvc/ -all: update +$(foreach d,$(HG_DIRS) ,$(call eval-vcs-template,HG_TMPL,$d)) +$(foreach d,$(GIT_DIRS),$(call eval-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)) -VCS_MK := $(HOME)/Documents/mk/vcs.mk -ifneq (,$(wildcard $(VCS_MK))) - include $(VCS_MK) -else - $(error [ERROR] could not find '$(VCS_MK)') -endif -$(foreach d,$(HGREPOS),\ - $(eval $(call HG_TMPL,$(d),$(URL-$(d))))) +# ######################################################################### +# auctex +# ######################################################################### +.PHONY: auctex +auctex: + $(MAKE) -C $(DIR-$@) clean + $(MAKE) -C $(DIR-$@) lisp info install\ + EMACS=$(EMACS)\ + auctexstartfile=$(LISP_DIR)/auctex.el\ + previewstartfile=$(LISP_DIR)/preview-latex.el\ + packagedatadir=$(LISP_DIR)/auctex\ + packagelispdir=$(LISP_DIR)/auctex\ + localstatedir=$(DOT_DIR)/var\ + datarootdir=$(DOT_DIR)/var\ + infodir=$(INFO_DIR)\ + lispdir=$(LISP_DIR)\ -$(foreach d,$(GITREPOS),\ - $(eval $(call GIT_TMPL,$(d),$(URL-$(d))))) -$(foreach d,$(BZRREPOS),\ - $(eval $(call BZR_TMPL,$(d),$(URL-$(d))))) +# ######################################################################### +# reftex +# ######################################################################### +.PHONY: reftex +reftex: + $(MAKE) -C $(DIR-$@) clean + $(MAKE) -C $(DIR-$@) lisp info install\ + EMACS=$(EMACS)\ + infodir=$(INFO_DIR)\ + lispdir=$(LISP_DIR)/reftex\ -$(foreach d,$(SVNREPOS),\ - $(eval $(call SVN_TMPL,$(d),$(URL-$(d))))) -$(foreach d,$(CVSREPOS),\ - $(eval $(call CVS_TMPL,$(d),$(URL-$(d))))) +# ######################################################################### +# ess +# ######################################################################### +.PHONY: ess +ess: + -install-info --info-dir=$(INFO_DIR) --remove $(INFO_DIR)/ess.info + $(MAKE) -C $(DIR-$@) all install\ + EMACS=$(EMACS)\ + PREFIX=$(DOT_DIR)\ + LISPDIR=$(LISP_DIR)/ess\ + ETCDIR=$(LISP_DIR)/ess/etc\ + INFODIR=$(INFO_DIR)\ + +# ######################################################################### +# doxymacs +# ######################################################################### +.PHONY: doxymacs +doxymacs: + $(MAKE) -C $(DIR-$@) clean + $(MAKE) -C $(DIR-$@) all install\ + EMACS=$(EMACS)\ + lispdir=$(LISP_DIR)/dvc\ + infodir=$(INFO_DIR)\ + prefix=$(HOME)/Tools/gnuwinkt\ + INSTALL=install + + +# ######################################################################### +# gnus +# ######################################################################### +.PHONY: gnus +$(ELISP_DIR)/gnus/Makefile: + cd $(@D) && ./configure + +gnus: $(ELISP_DIR)/gnus/Makefile + $(MAKE) -C $(DIR-$@) clean + $(MAKE) -C $(DIR-$@) all\ + EMACS="$(EMACS) --eval '(setq vc-handled-backends nil)'"\ + lispdir=$(LISP_DIR)/gnus\ + infodir=$(INFO_DIR)\ + + +# ######################################################################### +# dvc +# ######################################################################### +.PHONY: dvc +dvc: + -install-info --info-dir=$(INFO_DIR) --remove $(INFO_DIR)/dvc.info + $(MAKE) -C $(DIR-$@) clean + $(MAKE) -C $(DIR-$@) all install\ + EMACS=$(EMACS)\ + lispdir=$(LISP_DIR)/dvc\ + info_dir=$(INFO_DIR)\ + INSTALL=install + + +# ######################################################################### +# 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)/var/share + $(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)/var/share + + +# ######################################################################### +# 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 + + +# ######################################################################### +# emacs-jabber +# ######################################################################### +.PHONY: emacs-jabber +$(ELISP_DIR)/emacs-jabber/configure: + cd $(@D) && autoreconf -i + +$(ELISP_DIR)/emacs-jabber/Makefile: $(ELISP_DIR)/emacs-jabber/configure + cd $(@D) && ./configure + +emacs-jabber: $(ELISP_DIR)/emacs-jabber/Makefile + $(MAKE) -C $(DIR-$@) install\ + EMACS=$(EMACS)\ + prefix=$(DOT_DIR)\ + lispdir=$(LISP_DIR)/jabber\ + infodir=$(INFO_DIR)\ + libexecdir=$(LISP_DIR)/jabber/bin + + +# ######################################################################### +# bbdb +# ######################################################################### +.PHONY: bbdb +$(ELISP_DIR)/bbdb/configure :\ + $(ELISP_DIR)/bbdb/configure.ac + cd $(ELISP_DIR)/bbdb && autoconf + +$(ELISP_DIR)/bbdb/Makefile :\ + $(ELISP_DIR)/bbdb/configure\ + $(ELISP_DIR)/bbdb/Makefile.in\ + $(ELISP_DIR)/bbdb/doc/Makefile.in\ + $(ELISP_DIR)/bbdb/lisp/Makefile.in\ + $(ELISP_DIR)/bbdb/tex/Makefile.in + cd $(@D) && ./configure\ + --with-emacs=$(EMACS)\ + --datarootdir=$(DOT_DIR)\ + --with-lispdir=$(LISP_DIR)/bbdb\ + --with-texmf-dir=$(DOT_DIR)/var/texmf +bbdb: $(ELISP_DIR)/bbdb/Makefile + $(MAKE) -C $(DIR-$@) install + + +# ######################################################################### +# w3 +# ######################################################################### +.PHONY: w3 +w3: + $(MAKE) -C $(DIR-$@) install\ + EMACS=$(EMACS)\ + prefix=$(DOT_DIR)\ + lispdir=$(LISP_DIR)/w3\ + infodir=$(INFO_DIR)\ + libexecdir=$(LISP_DIR)/w3/bin\ + datadir=$(DOT_DIR)/var/share\ + + +# ######################################################################### +# include .el pattern rules +# ######################################################################### +$(call include-once,$(MK_DIR)/emacsd-rules.mk) + +# Local Variables: +# tab-width: 2 +# End: