Browse Source

Update the build and install process

master
Peter J. Jones 9 years ago
parent
commit
5fc5942c61
2 changed files with 10 additions and 9 deletions
  1. 1
    0
      .gitignore
  2. 9
    9
      Makefile

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
*.elc

+ 9
- 9
Makefile View File

@@ -1,26 +1,26 @@
PREFIX = /usr/local
SITE_LISP = share/emacs/site-lisp/idea
SOURCE = $(notdir $(wildcard lisp/*.el))
SOURCE = $(wildcard lisp/*.el)
DEST = $(PREFIX)/$(SITE_LISP)
DEST_FILES = $(foreach s,$(SOURCE),$(DEST)/$(s))

EMACS = emacs
EMACS_FLAGS = -q --no-site-file --batch
EMACS_FLAGS += --eval "(add-to-list 'load-path \".\")"
EMACS_FLAGS += -f batch-byte-compile

install: $(DEST) $(DEST_FILES:.el=.elc) $(DEST_FILES)
all: $(SOURCE:.el=.elc)

install: all $(DEST)
cp $(SOURCE) $(SOURCE:.el=.elc) $(DEST)

clean:
rm -f $(SOURCE:.el=.elc)

$(DEST):
mkdir -p $@

.SUFFIXES: .el .elc

$(DEST)/%.elc: lisp/%.el
%.elc: %.el
@ echo compile $(notdir $<)
@ $(EMACS) $(EMACS_FLAGS) $< 2>&1 | (egrep -v ^Wrote; exit 0)
@ mv $(<:.el=.elc) $@

$(DEST)/%.el: lisp/%.el
@ echo install $(notdir $<)
@ cp $< $@

Loading…
Cancel
Save