forked from mirrors/org-mode
6da2d089b0
* targets.mk: check for release and git version and record this into environment variables for use in sub-make invocations; add new target "compile-dirty" that does not invoke "make clean" first * doc/Makefile, lisp/Makefile: remove git version check, since they are now provided by first-level make * lisp/Makefile: add insertion of version information into org-install.el, have org-install.el depend on LISPF rather than LISPC so that autoloads can be produced without compiling everything and remove insertion into org.el and re-compilation during install; add new target "compile-dirty" to support invocation from first-level make * lisp/org.el (org-version): remove determination of version information, show "N/A" if the information is not provided via org-install.el
72 lines
1.4 KiB
Makefile
72 lines
1.4 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-%)
|
|
|
|
GITVERSION = $(shell git describe --abbrev=6 HEAD)
|
|
ORGVERSION = $(subst release_,,$(shell git describe --abbrev=0 HEAD))
|
|
GITSTATUS = $(shell git status -uno --porcelain)
|
|
DATE = $(shell date +%Y-%m-%d)
|
|
ifneq ("$(GITSTATUS)", "")
|
|
GITVERSION := $(GITVERSION).dirty
|
|
endif
|
|
|
|
.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
|
|
|
|
compile \
|
|
compile-dirty:: lisp
|
|
$(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
|