2011-07-12 16:31:41 -04:00
|
|
|
.NOTPARALLEL: .PHONY
|
2011-07-12 13:45:59 -04:00
|
|
|
# Additional distribution files
|
|
|
|
DISTFILES_extra= Makefile request-assign-future.txt contrib etc
|
2011-07-16 16:49:24 -04:00
|
|
|
.EXPORT_ALL_VARIABLES:
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-01-02 15:24:36 -05:00
|
|
|
LISPDIRS = lisp
|
|
|
|
SUBDIRS = doc etc $(LISPDIRS)
|
|
|
|
INSTSUB = $(SUBDIRS:%=install-%)
|
2012-04-22 02:22:31 -04:00
|
|
|
ORG_MAKE_DOC ?= info html pdf
|
2012-01-02 15:24:36 -05:00
|
|
|
|
|
|
|
ifneq ($(wildcard .git),)
|
|
|
|
GITVERSION ?= $(shell git describe --abbrev=6 HEAD)
|
|
|
|
ORGVERSION ?= $(subst release_,,$(shell git describe --abbrev=0 HEAD))
|
|
|
|
GITSTATUS ?= $(shell git status -uno --porcelain)
|
|
|
|
else
|
|
|
|
GITVERSION ?= N/A
|
|
|
|
ORGVERSION ?= N/A
|
|
|
|
endif
|
|
|
|
DATE = $(shell date +%Y-%m-%d)
|
|
|
|
ifneq ($(GITSTATUS),)
|
2011-11-06 11:53:45 -05:00
|
|
|
GITVERSION := $(GITVERSION).dirty
|
|
|
|
endif
|
|
|
|
|
2012-04-23 15:20:58 -04:00
|
|
|
.PHONY: all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \
|
2012-04-22 02:05:51 -04:00
|
|
|
check test install info html pdf card doc docs $(INSTSUB) \
|
2012-01-05 14:54:52 -05:00
|
|
|
autoloads cleanall clean cleancontrib cleanrel clean-install \
|
2012-04-23 15:20:58 -04:00
|
|
|
cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest \
|
|
|
|
compile compile-dirty
|
|
|
|
|
|
|
|
oldorg: compile autoloads info # what the old makefile did when no target was specified
|
|
|
|
refcard: card
|
|
|
|
update update2:: up0 all
|
|
|
|
|
|
|
|
.PRECIOUS: local.mk
|
|
|
|
local.mk:
|
|
|
|
$(info ==========================================)
|
|
|
|
$(info Created a local.mk template.)
|
|
|
|
$(info Please adapt local.mk to your local setup!)
|
|
|
|
$(info ==========================================)
|
|
|
|
-@$(SED) -n \
|
|
|
|
-e '/-8<-/,/->8-/ {s/^\(\s*[^#]\)/#\1/;p}' \
|
|
|
|
-e '$$ i ## See default.mk for further configuration options.' \
|
|
|
|
default.mk > $@
|
2012-04-21 11:25:35 -04:00
|
|
|
|
2011-11-13 05:53:12 -05:00
|
|
|
all \
|
2011-11-06 11:53:45 -05:00
|
|
|
compile:: lisp
|
2011-09-25 05:17:53 -04:00
|
|
|
$(MAKE) -C $< clean
|
2011-11-06 11:53:45 -05:00
|
|
|
|
|
|
|
compile \
|
|
|
|
compile-dirty:: lisp
|
2011-07-17 08:49:43 -04:00
|
|
|
$(MAKE) -C $< $@
|
|
|
|
|
2011-07-18 11:55:23 -04:00
|
|
|
all \
|
2012-04-22 02:05:51 -04:00
|
|
|
clean-install::
|
|
|
|
$(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;)
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-02-14 13:36:59 -05:00
|
|
|
check test:: all
|
2012-01-04 15:02:14 -05:00
|
|
|
|
2012-02-14 13:36:59 -05:00
|
|
|
check test \
|
2012-01-04 15:02:14 -05:00
|
|
|
test-dirty::
|
2012-02-16 15:24:51 -05:00
|
|
|
-$(MKDIR) $(testdir)
|
|
|
|
TMPDIR=$(testdir) $(BTEST)
|
|
|
|
ifeq ($(TEST_NO_AUTOCLEAN),) # define this variable to leave $(testdir) around for inspection
|
|
|
|
$(MAKE) cleantest
|
|
|
|
endif
|
2012-01-04 15:02:14 -05:00
|
|
|
|
2012-04-23 15:20:58 -04:00
|
|
|
up0 up1 up2::
|
2012-01-05 14:54:52 -05:00
|
|
|
git remote update
|
2011-07-12 13:45:59 -04:00
|
|
|
git pull
|
2012-04-23 15:20:58 -04:00
|
|
|
up1 up2:: all
|
|
|
|
$(MAKE) test-dirty
|
|
|
|
up2 update2::
|
|
|
|
$(SUDO) $(MAKE) install
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2011-07-19 14:05:14 -04:00
|
|
|
install: $(INSTSUB)
|
|
|
|
|
|
|
|
install-info: install-doc
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-04-22 02:22:31 -04:00
|
|
|
doc docs: $(ORG_MAKE_DOC)
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
info html pdf card:
|
|
|
|
$(MAKE) -C doc $@
|
2011-07-12 16:31:41 -04:00
|
|
|
|
2011-07-19 14:05:14 -04:00
|
|
|
$(INSTSUB):
|
|
|
|
$(MAKE) -C $(@:install-%=%) install
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-01-05 14:54:52 -05:00
|
|
|
autoloads: lisp
|
2011-07-17 08:49:43 -04:00
|
|
|
$(MAKE) -C $< $@
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-04-22 02:05:51 -04:00
|
|
|
cleandirs:
|
|
|
|
$(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) cleanall;)
|
2011-07-12 16:31:41 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
clean: cleanrel
|
2011-07-16 16:49:24 -04:00
|
|
|
$(MAKE) -C lisp clean
|
2011-07-17 08:49:43 -04:00
|
|
|
$(MAKE) -C doc clean
|
2012-02-16 15:24:51 -05:00
|
|
|
|
2012-04-23 15:20:58 -04:00
|
|
|
cleanall: cleandirs cleantest cleancontrib
|
2011-07-12 16:31:41 -04:00
|
|
|
-$(FIND) . -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleancontrib:
|
|
|
|
-$(FIND) contrib -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleanrel:
|
2011-07-17 08:49:43 -04:00
|
|
|
$(RMR) RELEASEDIR
|
|
|
|
$(RMR) org-7.*
|
|
|
|
$(RMR) org-7*zip org-7*tar.gz
|
2012-01-05 14:54:52 -05:00
|
|
|
|
|
|
|
cleanelc cleanlisp:
|
|
|
|
$(MAKE) -C lisp clean
|
2012-02-16 15:24:51 -05:00
|
|
|
-$(FIND) lisp -name \*~ -exec $(RM) {} \;
|
2012-01-05 14:54:52 -05:00
|
|
|
|
|
|
|
cleandoc cleandocs:
|
|
|
|
$(MAKE) -C doc clean
|
2012-02-16 15:24:51 -05:00
|
|
|
-$(FIND) doc -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleantest:
|
|
|
|
$(RMR) $(testdir)
|