2011-11-13 05:53:12 -05:00
|
|
|
.NOTPARALLEL: # always run this make serially
|
2011-11-13 05:07:21 -05:00
|
|
|
.SUFFIXES: # we don't need default suffix rules
|
2011-07-17 08:49:43 -04:00
|
|
|
ifeq ($(MAKELEVEL), 0)
|
|
|
|
$(error This make needs to be started as a sub-make from the toplevel directory.)
|
|
|
|
endif
|
|
|
|
|
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 13:24:39 -04:00
|
|
|
LISPV = org-version.el
|
2012-10-02 06:19:39 -04:00
|
|
|
LISPI = org-loaddefs.el
|
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 13:24:39 -04:00
|
|
|
LISPA = $(LISPV) $(LISPI)
|
2012-08-19 06:20:47 -04:00
|
|
|
LISPF = $(filter-out $(LISPA),$(sort $(wildcard *.el)))
|
2012-06-04 15:27:27 -04:00
|
|
|
LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
|
2012-08-22 12:43:03 -04:00
|
|
|
_ORGCM_ = dirall single source slint1 slint2
|
|
|
|
-include local.mk
|
2011-07-16 16:49:24 -04:00
|
|
|
|
2012-08-19 06:20:47 -04:00
|
|
|
.PHONY: all compile compile-dirty \
|
2012-08-22 12:43:03 -04:00
|
|
|
$(_ORGCM_) $(_ORGCM_:%=compile-%) \
|
2012-09-20 16:35:35 -04:00
|
|
|
autoloads addcontrib \
|
2012-08-19 06:20:47 -04:00
|
|
|
install clean cleanauto cleanall cleanelc clean-install
|
2011-07-16 16:49:24 -04: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 13:24:39 -04:00
|
|
|
# do not clean here, done in toplevel make
|
2012-08-19 06:20:47 -04:00
|
|
|
all compile compile-dirty:: autoloads
|
2012-08-22 12:43:03 -04:00
|
|
|
ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
|
2012-08-19 06:21:33 -04:00
|
|
|
$(MAKE) compile-$(ORGCM)
|
2012-08-22 12:43:03 -04:00
|
|
|
else
|
|
|
|
$(error ORGCM has illegal value $(ORGCM) (valid: $(_ORGCM_)))
|
|
|
|
endif
|
2012-08-19 06:20:47 -04:00
|
|
|
|
2012-08-19 06:21:33 -04: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 06:20:47 -04:00
|
|
|
@$(ELCDIR)
|
2012-08-19 06:21:33 -04:00
|
|
|
single:
|
|
|
|
@$(info ==================== $@ ====================)
|
|
|
|
source: cleanelc
|
|
|
|
@$(info ==================== $@ ====================)
|
2012-08-04 09:50:39 -04:00
|
|
|
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
|
2012-08-19 06:21:33 -04:00
|
|
|
slint1:
|
|
|
|
@$(info ==================== $@ ====================)
|
2012-08-19 06:20:47 -04:00
|
|
|
@$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);)
|
2012-08-04 09:50:39 -04:00
|
|
|
|
|
|
|
%.elc: %.el
|
2012-08-19 06:20:47 -04:00
|
|
|
@$(info Compiling single $(abspath $<)...)
|
|
|
|
-@$(ELC) $<
|
2011-07-16 16:49:24 -04:00
|
|
|
|
2012-09-20 16:35:35 -04:00
|
|
|
addcontrib:
|
|
|
|
ifneq ($(ORG_ADD_CONTRIB),)
|
|
|
|
$(CP) $(wildcard \
|
|
|
|
$(addsuffix .el, \
|
|
|
|
$(addprefix ../contrib/lisp/, \
|
|
|
|
$(basename \
|
|
|
|
$(notdir $(ORG_ADD_CONTRIB)))))) .
|
|
|
|
endif
|
|
|
|
|
|
|
|
autoloads: cleanauto addcontrib $(LISPI) $(LISPV)
|
2011-07-16 16:49:24 -04:00
|
|
|
|
2012-04-30 00:49:23 -04:00
|
|
|
$(LISPV): $(LISPF)
|
2012-04-21 11:25:35 -04:00
|
|
|
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
|
2012-04-30 00:49:23 -04: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 13:24:39 -04:00
|
|
|
@$(MAKE_ORG_VERSION)
|
2012-04-16 13:35:55 -04:00
|
|
|
|
2012-04-30 00:49:23 -04:00
|
|
|
$(LISPI): $(LISPV) $(LISPF)
|
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 13:24:39 -04:00
|
|
|
@echo "org-install: $(ORGVERSION) ($(GITVERSION))"
|
2012-04-30 00:49:23 -04:00
|
|
|
@$(RM) $(@)
|
|
|
|
@$(MAKE_ORG_INSTALL)
|
2011-07-16 16:49:24 -04: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 13:24:39 -04:00
|
|
|
install: $(LISPF) compile
|
2012-01-02 14:30:32 -05: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 13:24:39 -04:00
|
|
|
$(CP) $(LISPC) $(LISPF) $(LISPA) $(DESTDIR)$(lispdir)
|
2011-07-16 16:49:24 -04: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 13:24:39 -04:00
|
|
|
cleanauto clean cleanall::
|
|
|
|
$(RM) $(LISPA) $(LISPA:%el=%elc)
|
2012-08-19 06:20:47 -04:00
|
|
|
clean cleanall cleanelc::
|
2011-07-18 11:55:23 -04:00
|
|
|
$(RM) *.elc
|
2012-10-03 05:32:46 -04:00
|
|
|
$(RM) org-install.el # Fix leftover from previous install method
|
2011-07-16 16:49:24 -04:00
|
|
|
|
2011-07-18 11:55:23 -04:00
|
|
|
clean-install:
|
2012-01-02 14:30:32 -05:00
|
|
|
if [ -d $(DESTDIR)$(lispdir) ] ; then \
|
|
|
|
$(RM) $(DESTDIR)$(lispdir)/org*.el* $(DESTDIR)$(lispdir)/ob*.el* ; \
|
|
|
|
fi ;
|