diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2012-08-22 08:04:56 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-08-23 12:32:38 +0200 |
commit | a90ff91350904de6692864ed43da1c161260b461 (patch) | |
tree | d36866aa6f5ab2f65f7355ffe6a0e086617b574e | |
parent | 85d6b781e49f5e8c674c02b3c06b2ff1cde99f84 (diff) | |
download | org-mode-a90ff91350904de6692864ed43da1c161260b461.tar.gz |
Makefile: adding files from contrib
* default.mk: Add customizatin variable ORG_ADD_CONTRIB with
descriptiona and commented example.
* targets.mk: Strip leading path and trailing suffix from all elements
of ORG_ADD_CONTRIB, then prefix with contrib/lisp and do wildcard
expansion (this will also remove any invalid names); store the
result in ORG_FROM_CONTRIB. Strip /contrib from ORG_FROM_CONTRIB
and store the result in ORG_TO_LISP. If these are non-empty, copy
the files from contrib/lisp/ into lisp/ before compilation and
remove them when cleanlisp is called.
-rw-r--r-- | default.mk | 4 | ||||
-rw-r--r-- | targets.mk | 19 |
2 files changed, 23 insertions, 0 deletions
@@ -22,6 +22,10 @@ infodir = $(prefix)/info # Define if you only need info documentation, the default includes html and pdf #ORG_MAKE_DOC = info # html pdf +# Define if you want to include some (or all) files from contrib/lisp +# just the filename please (no path prefix, no .el suffix), maybe with globbing +#ORG_ADD_CONTRIB = org-e-* org-md org-export # e.g. the new exporter + # Where to create temporary files for the testsuite # respect TMPDIR if it is already defined in the environment TMPDIR ?= /tmp @@ -10,6 +10,13 @@ SUBDIRS = $(OTHERDIRS) $(LISPDIRS) INSTSUB = $(SUBDIRS:%=install-%) ORG_MAKE_DOC ?= info html pdf +ORG_FROM_CONTRIB = $(wildcard \ + $(addsuffix .el, \ + $(addprefix contrib/lisp/, \ + $(basename \ + $(notdir $(ORG_ADD_CONTRIB)))))) +ORG_TO_LISP = $(ORG_FROM_CONTRIB:contrib/%=%) + ifneq ($(wildcard .git),) GITVERSION ?= $(shell git describe --abbrev=6 HEAD) ORGVERSION ?= $(subst release_,,$(shell git describe --abbrev=0 HEAD)) @@ -44,6 +51,9 @@ config config-all:: $(info ========= Emacs executable and Installation paths) $(foreach var,$(CONF_BASE),$(info $(var) = $($(var))$(EOL))) $(foreach var,$(CONF_DEST),$(info $(var) = $(DESTDIR)$($(var))$(EOL))) + $(info ========= Additional files from contrib/lisp) + $(info ORG_FROM_CONTRIB =) + $(info $(ORG_TO_LISP:lisp/%=%)) config-test config-all:: $(info ) $(info ========= Test configuration) @@ -78,6 +88,9 @@ local.mk: -@$(MAKE_LOCAL_MK) all compile:: +ifneq ($(ORG_FROM_CONTRIB),) + $(CP) $(ORG_FROM_CONTRIB) lisp/ +endif $(foreach dir, doc lisp, $(MAKE) -C $(dir) clean;) compile compile-dirty:: $(MAKE) -C lisp $@ @@ -127,6 +140,12 @@ cleanall: cleandirs cleantest $(CLEANDIRS:%=clean%): -$(FIND) $(@:clean%=%) \( -name \*~ -o -name \*.elc \) -exec $(RM) {} \; +ifneq ($(ORG_TO_LISP),) +cleanlisp: cleanaddcontrib +cleanaddcontrib: + $(RM) $(ORG_TO_LISP) +endif + cleanutils: cleanUTILITIES cleanrel: |