forked from mirrors/org-mode
clean up Makefile some more, keep autoloads around
* lisp/Makefile: remove stop targets, make autoloads depend on source files again (not .PHONY). Keep autoload files around after compile, but make sure to re-create them before installation and compile. Remove autoload files before re-creating them to avoid errors from Emacs when saving the buffer. * targets.mk: remove stop targets and the mess that was necessary to support them. * default.mk: must use $(CURDIR) not $(PWD), $(PWD) is not well defined when using sudo.
This commit is contained in:
parent
df89e3cd0c
commit
b567341443
|
@ -110,7 +110,7 @@ MAKE_ORG_INSTALL = $(BATCH) \
|
|||
--eval '(add-to-list '"'"'load-path ".")' \
|
||||
--eval '(load "org-compat.el")' \
|
||||
--eval '(load "../UTILITIES/org-fixup.el")' \
|
||||
--eval '(org-make-org-install "$(PWD)/lisp/org-install.el")'
|
||||
--eval '(org-make-org-install "$(CURDIR)/lisp/org-install.el")'
|
||||
|
||||
# How to generate org-version.el
|
||||
MAKE_ORG_VERSION = $(BATCH) \
|
||||
|
|
|
@ -10,36 +10,32 @@ LISPA = $(LISPV) $(LISPI)
|
|||
LISPF = $(filter-out $(LISPA),$(wildcard *.el))
|
||||
LISPC = $(LISPF:%el=%elc)
|
||||
|
||||
NOSTOP = all compile compile-dirty
|
||||
DOSTOP = compile-stop compile-stop-dirty
|
||||
|
||||
.PHONY: $(NOSTOP) $(DOSTOP) \
|
||||
autoloads $(LISPA) \
|
||||
install clean cleanauto cleanall clean-install \
|
||||
.PHONY: all compile compile-dirty \
|
||||
autoloads \
|
||||
install clean cleanauto cleanall clean-install
|
||||
|
||||
# do not clean here, done in toplevel make
|
||||
$(NOSTOP) $(DOSTOP):: $(LISPV)
|
||||
all compile:: autoloads
|
||||
all compile compile-dirty:: $(LISPA)
|
||||
$(ELCDIR)
|
||||
$(NOSTOP)::
|
||||
$(MAKE) cleanauto
|
||||
|
||||
autoloads: $(LISPA)
|
||||
autoloads: cleanauto $(LISPA)
|
||||
|
||||
$(LISPV):
|
||||
$(LISPV): $(LISPF)
|
||||
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
|
||||
@$(RM) $(@)
|
||||
@$(MAKE_ORG_VERSION)
|
||||
|
||||
$(LISPI): $(LISPV)
|
||||
$(LISPI): $(LISPV) $(LISPF)
|
||||
@echo "org-install: $(ORGVERSION) ($(GITVERSION))"
|
||||
$(MAKE_ORG_INSTALL)
|
||||
@$(RM) $(@)
|
||||
@$(MAKE_ORG_INSTALL)
|
||||
|
||||
install: $(LISPF) compile
|
||||
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
|
||||
$(MKDIR) $(DESTDIR)$(lispdir) ; \
|
||||
fi ;
|
||||
$(MAKE) autoloads
|
||||
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
|
||||
$(MAKE) cleanauto
|
||||
|
||||
cleanauto clean cleanall::
|
||||
$(RM) $(LISPA) $(LISPA:%el=%elc)
|
||||
|
|
14
targets.mk
14
targets.mk
|
@ -25,10 +25,10 @@ endif
|
|||
.PHONY: all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \
|
||||
check test install info html pdf card doc docs $(INSTSUB) \
|
||||
autoloads cleanall clean cleancontrib cleanutils cleanrel clean-install \
|
||||
cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest \
|
||||
compile compile-stop compile-dirty compile-stop-dirty uncompiled
|
||||
cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest
|
||||
compile compile-dirty uncompiled
|
||||
|
||||
oldorg: compile-stop info # what the old makefile did when no target was specified
|
||||
oldorg: compile info # what the old makefile did when no target was specified
|
||||
uncompiled: cleanlisp autoloads # for developing
|
||||
refcard: card
|
||||
update update2:: up0 all
|
||||
|
@ -48,9 +48,9 @@ local.mk:
|
|||
-e '$$ i ## See default.mk for further configuration options.' \
|
||||
default.mk > $@
|
||||
|
||||
all compile-stop compile:: lisp
|
||||
all compile:: lisp
|
||||
$(MAKE) -C $< clean
|
||||
compile compile-stop compile-dirty compile-stop-dirty:: lisp
|
||||
all compile compile-dirty:: lisp
|
||||
$(MAKE) -C $< $@
|
||||
|
||||
all clean-install::
|
||||
|
@ -59,9 +59,7 @@ all clean-install::
|
|||
check test:: all
|
||||
check test test-dirty::
|
||||
-$(MKDIR) $(testdir)
|
||||
$(MAKE) autoloads
|
||||
TMPDIR=$(testdir) $(BTEST)
|
||||
$(MAKE) -C lisp cleanauto
|
||||
ifeq ($(TEST_NO_AUTOCLEAN),) # define this variable to leave $(testdir) around for inspection
|
||||
$(MAKE) cleantest
|
||||
endif
|
||||
|
@ -72,7 +70,7 @@ up0 up1 up2::
|
|||
up1 up2:: all
|
||||
$(MAKE) test-dirty
|
||||
up2 update2::
|
||||
$(SUDO) $(MAKE) install-dirty
|
||||
$(SUDO) $(MAKE) install
|
||||
|
||||
install: $(INSTSUB)
|
||||
|
||||
|
|
Loading…
Reference in a new issue