Skip to content

Instantly share code, notes, and snippets.

@troter
Created April 30, 2009 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troter/104412 to your computer and use it in GitHub Desktop.
Save troter/104412 to your computer and use it in GitHub Desktop.
PWD=$(shell pwd)
EMACS_REPOS_DIR=emacs-git-repos
EMACS_DAILY=emacs-daily
EMACS_DAILY_DIR=emacs-daily-$(shell date +%Y%m%d%H%M)
CONFIGURE_OPTIONS=
.PHONY: all link build repository-update repository-init
all: build
repository-init:
if [ ! -e "$(EMACS_REPOS_DIR)" ]; then \
git clone --depth=1 git://git.savannah.gnu.org/emacs.git $(EMACS_REPOS_DIR); \
fi
repository-update: repository-init
(cd $(EMACS_REPOS_DIR); git pull)
build: repository-update
(cd $(EMACS_REPOS_DIR); \
make distclean; \
./configure \
$(CONFIGURE_OPTIONS) \
--prefix=$(PWD)/$(EMACS_DAILY_DIR) && \
make && \
make install)
link:
rm -f $(EMACS_DAILY)
ln -s $(shell ls . | grep $(EMACS_DAILY) | sort -r | tail -n 1) $(EMACS_DAILY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment