org-mode/targets.mk
Achim Gratz 465adbdae3 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.
2012-04-20 21:04:09 +02:00

61 lines
1.1 KiB
Makefile

.NOTPARALLEL: .PHONY
# Additional distribution files
DISTFILES_extra= Makefile request-assign-future.txt contrib etc
.EXPORT_ALL_VARIABLES:
LISPDIRS = lisp
SUBDIRS = doc $(LISPDIRS)
INSTSUB = $(SUBDIRS:%=install-%)
.PHONY: default all up2 update compile lisp doc \
install info html pdf card docs $(INSTSUB) \
autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
compile: lisp
$(MAKE) -C $< clean
$(MAKE) -C $< $@
all \
clean-install: $(SUBDIRS)
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
up2: update
sudo ${MAKE} install
update:
git pull
${MAKE} clean
${MAKE} all
install: $(INSTSUB)
install-info: install-doc
docs: info html pdf card
info html pdf card:
$(MAKE) -C doc $@
$(INSTSUB):
$(MAKE) -C $(@:install-%=%) install
autoloads: lisp maint.mk
$(MAKE) -C $< $@
cleanall: $(SUBDIRS)
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
-$(FIND) . -name \*~ -exec $(RM) {} \;
clean: cleanrel
$(MAKE) -C lisp clean
$(MAKE) -C doc clean
-$(FIND) . -name \*~ -exec $(RM) {} \;
cleancontrib:
-$(FIND) contrib -name \*~ -exec $(RM) {} \;
cleanrel:
$(RMR) RELEASEDIR
$(RMR) org-7.*
$(RMR) org-7*zip org-7*tar.gz