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-21 11:25:35 -04:00
|
|
|
.PHONY: default all oldorg up2 update compile lisp doc etc \
|
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-02-16 15:24:51 -05:00
|
|
|
cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-04-21 11:25:35 -04:00
|
|
|
# backwards compatibility target
|
|
|
|
oldorg: compile autoloads info
|
|
|
|
|
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
|
|
|
|
2011-07-12 13:45:59 -04:00
|
|
|
up2: update
|
2012-01-31 14:44:37 -05:00
|
|
|
$(SUDO) $(MAKE) install
|
2011-07-12 13:45:59 -04:00
|
|
|
|
|
|
|
update:
|
2012-01-05 14:54:52 -05:00
|
|
|
git remote update
|
2011-07-12 13:45:59 -04:00
|
|
|
git pull
|
2012-03-04 11:49:28 -05:00
|
|
|
$(MAKE) check
|
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
|
|
|
|
|
|
|
cleanall: cleandirs cleantest
|
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)
|