2011-11-13 10:53:12 +00:00
|
|
|
.NOTPARALLEL: # always run this make serially
|
2011-11-13 10:07:21 +00:00
|
|
|
.SUFFIXES: # we don't need default suffix rules
|
2011-07-17 12:49:43 +00:00
|
|
|
ifeq ($(MAKELEVEL), 0)
|
|
|
|
$(error This make needs to be started as a sub-make from the toplevel directory.)
|
|
|
|
endif
|
|
|
|
|
2012-11-07 17:38:12 +00:00
|
|
|
ifneq ($(ORG_ADD_CONTRIB),)
|
|
|
|
_ORG_ADD_EL_ := \
|
|
|
|
$(notdir \
|
|
|
|
$(wildcard \
|
|
|
|
$(addsuffix .el, \
|
|
|
|
$(addprefix ../contrib/lisp/, \
|
|
|
|
$(basename \
|
|
|
|
$(notdir $(ORG_ADD_CONTRIB)))))))
|
|
|
|
endif
|
|
|
|
|
|
|
|
LISPV := org-version.el
|
|
|
|
LISPI := org-loaddefs.el
|
|
|
|
LISPA := $(LISPV) $(LISPI)
|
|
|
|
LISPB := $(LISPA:%el=%elc) org-install.elc
|
|
|
|
LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el) $(_ORG_ADD_EL_)))
|
|
|
|
LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
|
|
|
|
_ORGCM_ := dirall single source slint1 slint2
|
2012-08-22 16:43:03 +00:00
|
|
|
-include local.mk
|
2011-07-16 20:49:24 +00:00
|
|
|
|
2012-08-19 10:20:47 +00:00
|
|
|
.PHONY: all compile compile-dirty \
|
2012-08-22 16:43:03 +00:00
|
|
|
$(_ORGCM_) $(_ORGCM_:%=compile-%) \
|
2012-09-20 20:35:35 +00:00
|
|
|
autoloads addcontrib \
|
2012-08-19 10:20:47 +00:00
|
|
|
install clean cleanauto cleanall cleanelc clean-install
|
2011-07-16 20:49:24 +00:00
|
|
|
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 17:24:39 +00:00
|
|
|
# do not clean here, done in toplevel make
|
2012-08-19 10:20:47 +00:00
|
|
|
all compile compile-dirty:: autoloads
|
2012-08-22 16:43:03 +00:00
|
|
|
ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
|
2012-08-19 10:21:33 +00:00
|
|
|
$(MAKE) compile-$(ORGCM)
|
2012-08-22 16:43:03 +00:00
|
|
|
else
|
|
|
|
$(error ORGCM has illegal value $(ORGCM) (valid: $(_ORGCM_)))
|
|
|
|
endif
|
2012-08-19 10:20:47 +00:00
|
|
|
|
2012-08-19 10:21:33 +00:00
|
|
|
compile-dirall: dirall
|
|
|
|
compile-single: single $(LISPC)
|
|
|
|
compile-source: source dirall
|
|
|
|
compile-slint1: dirall slint1
|
|
|
|
compile-slint2: source dirall slint1
|
|
|
|
|
|
|
|
# internal
|
|
|
|
dirall:
|
|
|
|
@$(info ==================== $@ ====================)
|
2012-08-19 10:20:47 +00:00
|
|
|
@$(ELCDIR)
|
2012-08-19 10:21:33 +00:00
|
|
|
single:
|
|
|
|
@$(info ==================== $@ ====================)
|
|
|
|
source: cleanelc
|
|
|
|
@$(info ==================== $@ ====================)
|
2012-08-04 13:50:39 +00:00
|
|
|
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
|
2012-08-19 10:21:33 +00:00
|
|
|
slint1:
|
|
|
|
@$(info ==================== $@ ====================)
|
2012-08-19 10:20:47 +00:00
|
|
|
@$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
|
2012-08-04 13:50:39 +00:00
|
|
|
|
|
|
|
%.elc: %.el
|
2012-08-19 10:20:47 +00:00
|
|
|
@$(info Compiling single $(abspath $<)...)
|
|
|
|
-@$(ELC) $<
|
2011-07-16 20:49:24 +00:00
|
|
|
|
2012-09-20 20:35:35 +00:00
|
|
|
addcontrib:
|
|
|
|
ifneq ($(ORG_ADD_CONTRIB),)
|
2012-11-07 17:38:12 +00:00
|
|
|
$(CP) $(addprefix ../contrib/lisp/,$(_ORG_ADD_EL_)) .
|
2012-09-20 20:35:35 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
autoloads: cleanauto addcontrib $(LISPI) $(LISPV)
|
2011-07-16 20:49:24 +00:00
|
|
|
|
2012-04-30 04:49:23 +00:00
|
|
|
$(LISPV): $(LISPF)
|
2012-04-21 15:25:35 +00:00
|
|
|
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
|
2012-04-30 04:49:23 +00:00
|
|
|
@$(RM) $(@)
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 17:24:39 +00:00
|
|
|
@$(MAKE_ORG_VERSION)
|
2012-04-16 17:35:55 +00:00
|
|
|
|
2012-04-30 04:49:23 +00:00
|
|
|
$(LISPI): $(LISPV) $(LISPF)
|
2012-10-03 16:39:07 +00:00
|
|
|
@echo "org-loaddefs: $(ORGVERSION) ($(GITVERSION))"
|
2012-04-30 04:49:23 +00:00
|
|
|
@$(RM) $(@)
|
|
|
|
@$(MAKE_ORG_INSTALL)
|
2011-07-16 20:49:24 +00:00
|
|
|
|
2012-11-07 17:38:12 +00:00
|
|
|
install: compile $(LISPF)
|
2012-01-02 19:30:32 +00:00
|
|
|
if [ ! -d $(DESTDIR)$(lispdir) ] ; then \
|
|
|
|
$(MKDIR) $(DESTDIR)$(lispdir) ; \
|
|
|
|
fi ;
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 17:24:39 +00:00
|
|
|
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
|
2011-07-16 20:49:24 +00:00
|
|
|
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 17:24:39 +00:00
|
|
|
cleanauto clean cleanall::
|
2012-10-03 16:39:07 +00:00
|
|
|
$(RM) $(LISPA) $(LISPB)
|
2012-08-19 10:20:47 +00:00
|
|
|
clean cleanall cleanelc::
|
2011-07-18 15:55:23 +00:00
|
|
|
$(RM) *.elc
|
2011-07-16 20:49:24 +00:00
|
|
|
|
2011-07-18 15:55:23 +00:00
|
|
|
clean-install:
|
2012-01-02 19:30:32 +00:00
|
|
|
if [ -d $(DESTDIR)$(lispdir) ] ; then \
|
|
|
|
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
|
|
|
|
fi ;
|