targets.mk 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .NOTPARALLEL: .PHONY
  2. # Additional distribution files
  3. DISTFILES_extra= Makefile request-assign-future.txt contrib etc
  4. .EXPORT_ALL_VARIABLES:
  5. LISPDIRS = lisp
  6. SUBDIRS = doc $(LISPDIRS)
  7. INSTSUB = $(SUBDIRS:%=install-%)
  8. GITVERSION = $(shell git describe --abbrev=6 HEAD)
  9. ORGVERSION = $(subst release_,,$(shell git describe --abbrev=0 HEAD))
  10. GITSTATUS = $(shell git status -uno --porcelain)
  11. DATE = $(shell date +%Y-%m-%d)
  12. ifneq ("$(GITSTATUS)", "")
  13. GITVERSION := $(GITVERSION).dirty
  14. endif
  15. .PHONY: default all up2 update compile lisp doc \
  16. install info html pdf card docs $(INSTSUB) \
  17. autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel
  18. all \
  19. compile:: lisp
  20. $(MAKE) -C $< clean
  21. compile \
  22. compile-dirty:: lisp
  23. $(MAKE) -C $< $@
  24. all \
  25. clean-install:: $(SUBDIRS)
  26. $(foreach dir, $?, $(MAKE) -C $(dir) $@;)
  27. up2: update
  28. sudo ${MAKE} install
  29. update:
  30. git pull
  31. ${MAKE} clean
  32. ${MAKE} all
  33. install: $(INSTSUB)
  34. install-info: install-doc
  35. docs: info html pdf card
  36. info html pdf card:
  37. $(MAKE) -C doc $@
  38. $(INSTSUB):
  39. $(MAKE) -C $(@:install-%=%) install
  40. autoloads: lisp maint.mk
  41. $(MAKE) -C $< $@
  42. cleanall: $(SUBDIRS)
  43. $(foreach dir, $?, $(MAKE) -C $(dir) $@;)
  44. -$(FIND) . -name \*~ -exec $(RM) {} \;
  45. clean: cleanrel
  46. $(MAKE) -C lisp clean
  47. $(MAKE) -C doc clean
  48. -$(FIND) . -name \*~ -exec $(RM) {} \;
  49. cleancontrib:
  50. -$(FIND) contrib -name \*~ -exec $(RM) {} \;
  51. cleanrel:
  52. $(RMR) RELEASEDIR
  53. $(RMR) org-7.*
  54. $(RMR) org-7*zip org-7*tar.gz