瀏覽代碼

Always "make clean" for lisp files before compiling them

	* Makefile: prepend "make clean" in lisp directory when compiling

Rationale: Emacs prefers the compiled lisp files even if the source is newer.
In case of circular dependencies or if the dependencies file is not correct,
the compiled files might not reflect the sources.  Since there is no canonical
way to remove all compiled files which are stale (it can be hacked, but it is
really ugly), it seems more prudent to just always remove the compiled files
before starting the compilation.  Most folks already already do that anyway.
Achim Gratz 13 年之前
父節點
當前提交
465adbdae3
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      targets.mk

+ 1 - 0
targets.mk

@@ -12,6 +12,7 @@ INSTSUB         = $(SUBDIRS:%=install-%)
 	autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
 
 compile:	lisp
+	$(MAKE) -C $< clean
 	$(MAKE) -C $< $@
 
 all \