chiark / gitweb /
Makefile: Don't write `.el' explicitly on all of the Emacs Lisp names.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 13 Aug 2017 03:25:14 +0000 (04:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 13 Aug 2017 03:25:14 +0000 (04:25 +0100)
Some parts of the makefile need to talk about filenames, but don't do
that in the rest.

Makefile

index 52a730c383fc91810652c652b8f4d04f20d75575..600defa6cc1a5edc600d93bbda2b0ce6428f0ed0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -66,12 +66,11 @@ _force:
 
 EMACSLIB                = $(HOME)/lib/emacs
 
-ELISP                  += dot-emacs.el
-ELISP                  += make-regexp.el ew-hols.el
-ELISP                  += mdw-gnus-patch.el
-ELISP                  += mdw-multiple-cursors.el
-ELISP                  += git.el git-blame.el vc-git.el stgit.el quilt.el
-ELISP                  += bracketed-paste.el
+ELISP                  += make-regexp ew-hols
+ELISP                  += mdw-gnus-patch
+ELISP                  += mdw-multiple-cursors
+ELISP                  += git git-blame vc-git stgit quilt
+ELISP                  += bracketed-paste
 
 SCRIPTLINKS            += emacsclient-hack movemail-hack sendmail-hack
 SCRIPTLINKS            += aspell-hack emerge-hack
@@ -81,8 +80,10 @@ SCRIPTLINKS          += aspell-hack emerge-hack
                --batch --no-site-file \
                --eval '(byte-compile-file "$<")'
 
-LOCAL_ELISP             = $(filter $(notdir $(wildcard el/*.el)), $(ELISP))
-$(foreach e, $(LOCAL_ELISP), $(eval DEP_$e = $(EMACSLIB)/$(e:.el=.elc)))
+LOCAL_ELISP             = $(filter $(notdir $(wildcard el/*.el)), \
+                               $(addsuffix .el, $(ELISP)))
+$(foreach e, $(LOCAL_ELISP), \
+       $(eval DEP_$(basename $e) = $(EMACSLIB)/$(e:.el=.elc)))
 $(addprefix $(EMACSLIB)/, $(LOCAL_ELISP)): $(EMACSLIB)/%: el/%
        $(call v_tag,SYMINK)mkdir -p $(EMACSLIB) && \
                rm -f $@.new && \
@@ -90,9 +91,9 @@ $(addprefix $(EMACSLIB)/, $(LOCAL_ELISP)): $(EMACSLIB)/%: el/%
                mv $@.new $@
 
 REMOTE_ELISP            = $(filter-out $(notdir $(wildcard el/*.el)), \
-                               $(ELISP))
+                               $(addsuffix .el, $(ELISP)))
 $(foreach e, $(REMOTE_ELISP), \
-       $(eval DEP_$e = $(if $(shell \
+       $(eval DEP_$(basename $e) = $(if $(shell \
                if $(EMACS) >/dev/null 2>&1 --no-site-file -q --batch \
                        --eval ' \
                          (progn \
@@ -109,7 +110,7 @@ $(addprefix $(EMACSLIB)/, $(REMOTE_ELISP)): $(EMACSLIB)/%:
 DOTLINKS               += .emacs .emacs-calc .vm .gnus.el .ercrc.el
 
 all:: $(foreach e, $(ELISP), $(DEP_$e))
-$(foreach e, $(ELISP), $(eval _emacs.$(e:.el=): $(EMACSLIB)/$(e:.el=.elc)))
+$(foreach e, $(ELISP), $(eval _emacs.$e: $(EMACSLIB)/$e.elc))
 
 ###--------------------------------------------------------------------------
 ### Other simpler things.