2011-07-12 20:31:41 +00:00
|
|
|
.NOTPARALLEL: .PHONY
|
2011-07-12 17:45:59 +00:00
|
|
|
# Additional distribution files
|
|
|
|
DISTFILES_extra= Makefile request-assign-future.txt contrib etc
|
2011-07-16 20:49:24 +00:00
|
|
|
.EXPORT_ALL_VARIABLES:
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-01-02 20:24:36 +00:00
|
|
|
LISPDIRS = lisp
|
|
|
|
SUBDIRS = doc etc $(LISPDIRS)
|
|
|
|
INSTSUB = $(SUBDIRS:%=install-%)
|
|
|
|
|
|
|
|
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 16:53:45 +00:00
|
|
|
GITVERSION := $(GITVERSION).dirty
|
|
|
|
endif
|
|
|
|
|
2011-12-16 09:33:45 +00:00
|
|
|
.PHONY: default all up2 update compile lisp doc etc \
|
2012-02-14 18:36:59 +00:00
|
|
|
check test install info html pdf card docs $(INSTSUB) \
|
2012-01-05 19:54:52 +00:00
|
|
|
autoloads cleanall clean cleancontrib cleanrel clean-install \
|
2012-02-16 20:24:51 +00:00
|
|
|
cleanelc cleandirs cleanlisp cleandoc cleandocs cleantest
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-11-13 10:53:12 +00:00
|
|
|
all \
|
2011-11-06 16:53:45 +00:00
|
|
|
compile:: lisp
|
2011-09-25 09:17:53 +00:00
|
|
|
$(MAKE) -C $< clean
|
2011-11-06 16:53:45 +00:00
|
|
|
|
|
|
|
compile \
|
|
|
|
compile-dirty:: lisp
|
2011-07-17 12:49:43 +00:00
|
|
|
$(MAKE) -C $< $@
|
|
|
|
|
2011-07-18 15:55:23 +00:00
|
|
|
all \
|
2011-11-13 10:53:12 +00:00
|
|
|
clean-install:: $(SUBDIRS)
|
2011-07-17 12:49:43 +00:00
|
|
|
$(foreach dir, $?, $(MAKE) -C $(dir) $@;)
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-02-14 18:36:59 +00:00
|
|
|
check test:: all
|
2012-01-04 20:02:14 +00:00
|
|
|
|
2012-02-14 18:36:59 +00:00
|
|
|
check test \
|
2012-01-04 20:02:14 +00:00
|
|
|
test-dirty::
|
2012-02-16 20:24:51 +00: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 20:02:14 +00:00
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
up2: update
|
2012-01-31 19:44:37 +00:00
|
|
|
$(SUDO) $(MAKE) install
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
update:
|
2012-01-05 19:54:52 +00:00
|
|
|
git remote update
|
2011-07-12 17:45:59 +00:00
|
|
|
git pull
|
2012-03-04 16:49:28 +00:00
|
|
|
$(MAKE) check
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-07-19 18:05:14 +00:00
|
|
|
install: $(INSTSUB)
|
|
|
|
|
|
|
|
install-info: install-doc
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-04-21 09:37:12 +00:00
|
|
|
doc docs: info html pdf card
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
info html pdf card:
|
|
|
|
$(MAKE) -C doc $@
|
2011-07-12 20:31:41 +00:00
|
|
|
|
2011-07-19 18:05:14 +00:00
|
|
|
$(INSTSUB):
|
|
|
|
$(MAKE) -C $(@:install-%=%) install
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-01-05 19:54:52 +00:00
|
|
|
autoloads: lisp
|
2011-07-17 12:49:43 +00:00
|
|
|
$(MAKE) -C $< $@
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-02-16 20:24:51 +00:00
|
|
|
cleandirs: $(SUBDIRS)
|
|
|
|
$(foreach dir, $?, $(MAKE) -C $(dir) cleanall;)
|
2011-07-12 20:31:41 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
clean: cleanrel
|
2011-07-16 20:49:24 +00:00
|
|
|
$(MAKE) -C lisp clean
|
2011-07-17 12:49:43 +00:00
|
|
|
$(MAKE) -C doc clean
|
2012-02-16 20:24:51 +00:00
|
|
|
|
|
|
|
cleanall: cleandirs cleantest
|
2011-07-12 20:31:41 +00:00
|
|
|
-$(FIND) . -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleancontrib:
|
|
|
|
-$(FIND) contrib -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleanrel:
|
2011-07-17 12:49:43 +00:00
|
|
|
$(RMR) RELEASEDIR
|
|
|
|
$(RMR) org-7.*
|
|
|
|
$(RMR) org-7*zip org-7*tar.gz
|
2012-01-05 19:54:52 +00:00
|
|
|
|
|
|
|
cleanelc cleanlisp:
|
|
|
|
$(MAKE) -C lisp clean
|
2012-02-16 20:24:51 +00:00
|
|
|
-$(FIND) lisp -name \*~ -exec $(RM) {} \;
|
2012-01-05 19:54:52 +00:00
|
|
|
|
|
|
|
cleandoc cleandocs:
|
|
|
|
$(MAKE) -C doc clean
|
2012-02-16 20:24:51 +00:00
|
|
|
-$(FIND) doc -name \*~ -exec $(RM) {} \;
|
|
|
|
|
|
|
|
cleantest:
|
|
|
|
$(RMR) $(testdir)
|