2011-07-12 17:45:59 +00:00
|
|
|
##----------------------------------------------------------------------
|
2012-01-05 19:54:52 +00:00
|
|
|
## NEVER EDIT THIS FILE, PUT ANY ADAPTATIONS INTO local.mk
|
|
|
|
##----------------------------------------------------------------------
|
|
|
|
## CHECK AND ADAPT THE FOLLOWING DEFINITIONS
|
2012-04-23 19:20:58 +00:00
|
|
|
##-8<-------------------------------------------------------------------
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-04-22 06:22:31 +00:00
|
|
|
# Override default target if desired or define your own default target
|
|
|
|
# oldorg: # have plain "make" do the same things the old Makefile did
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Name of your emacs binary
|
2012-01-05 19:54:52 +00:00
|
|
|
EMACS = emacs
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# Where local software is found
|
2012-01-05 19:54:52 +00:00
|
|
|
prefix = /usr/share
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# Where local lisp files go.
|
2012-01-05 19:54:52 +00:00
|
|
|
lispdir= $(prefix)/emacs/site-lisp/org
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-01-02 19:07:04 +00:00
|
|
|
# Where local data files go.
|
2012-01-04 20:02:14 +00:00
|
|
|
datadir = $(prefix)/emacs/etc/org
|
2012-01-02 19:07:04 +00:00
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Where info files go.
|
2011-07-12 18:11:15 +00:00
|
|
|
infodir = $(prefix)/info
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-04-22 06:22:31 +00:00
|
|
|
# Define if you only need info documentation, the default includes html and pdf
|
|
|
|
# ORG_MAKE_DOC = info # html pdf
|
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Where to create temporary files for the testsuite
|
2012-02-16 20:24:51 +00:00
|
|
|
TMPDIR ?= /tmp
|
|
|
|
testdir = $(TMPDIR)/tmp-orgtest
|
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Configuration for testing
|
|
|
|
BTEST_PRE = # add options before standard load-path
|
|
|
|
BTEST_POST = # add options after standard load path
|
|
|
|
# -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
|
|
|
|
# -L <path-to>/htmlize # need at least version 1.34 for source code formatting
|
|
|
|
BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave python sh # R
|
|
|
|
# R is not activated by default because it requires ess to be installed and configured
|
|
|
|
BTEST_EXTRA = # extra packages to require for testing
|
|
|
|
|
2012-04-23 19:20:58 +00:00
|
|
|
##->8-------------------------------------------------------------------
|
2012-01-05 19:54:52 +00:00
|
|
|
## YOU MAY NEED TO ADAPT THESE DEFINITIONS
|
2011-07-12 17:45:59 +00:00
|
|
|
##----------------------------------------------------------------------
|
|
|
|
|
2012-01-05 19:54:52 +00:00
|
|
|
# How to run tests
|
2012-03-04 11:07:44 +00:00
|
|
|
req-ob-lang = --eval '(require '"'"'ob-$(ob-lang))'
|
|
|
|
req-extra = --eval '(require '"'"'$(req))'
|
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
|
|
|
BTEST = $(BATCH) \
|
|
|
|
$(BTEST_PRE) \
|
|
|
|
--eval '(add-to-list '"'"'load-path "lisp")' \
|
|
|
|
--eval '(add-to-list '"'"'load-path "testing")' \
|
|
|
|
$(BTEST_POST) \
|
|
|
|
-l org-install.el \
|
2012-01-04 20:02:14 +00:00
|
|
|
-l testing/org-test.el \
|
2012-03-04 11:07:44 +00:00
|
|
|
$(foreach ob-lang,$(BTEST_OB_LANGUAGES),$(req-ob-lang)) \
|
|
|
|
$(foreach req,$(BTEST_EXTRA),$(req-extra)) \
|
|
|
|
--eval '(setq org-confirm-babel-evaluate nil)' \
|
2012-01-04 20:02:14 +00:00
|
|
|
-f org-test-run-batch-tests
|
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Using emacs in batch mode.
|
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
|
|
|
BATCH = $(EMACS) -batch -Q
|
|
|
|
# BATCH = $(EMACS) -batch -vanilla # XEmacs
|
2012-04-01 07:48:18 +00:00
|
|
|
|
2011-11-13 10:53:12 +00:00
|
|
|
# How to byte-compile the whole source directory
|
2012-01-05 19:54:52 +00:00
|
|
|
ELCDIR = $(BATCH) \
|
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
|
|
|
--eval '(add-to-list '"'"'load-path ".")' \
|
|
|
|
--eval '(batch-byte-recompile-directory 0)'
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# How to make a pdf file from a texinfo file
|
2012-01-05 19:54:52 +00:00
|
|
|
TEXI2PDF = texi2pdf --batch --clean
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
# How to make a pdf file from a tex file
|
|
|
|
PDFTEX = pdftex
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# How to create directories
|
2012-01-05 19:54:52 +00:00
|
|
|
MKDIR = mkdir -p
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# How to create the info files from the texinfo file
|
|
|
|
MAKEINFO = makeinfo
|
|
|
|
|
|
|
|
# How to create the HTML file
|
|
|
|
TEXI2HTML = makeinfo --html --number-sections
|
|
|
|
|
2011-07-12 20:31:41 +00:00
|
|
|
# How to find files
|
2012-01-05 19:54:52 +00:00
|
|
|
FIND = find
|
2011-07-12 20:31:41 +00:00
|
|
|
|
|
|
|
# How to remove files
|
2012-01-05 19:54:52 +00:00
|
|
|
RM = rm -f
|
2011-07-12 20:31:41 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
# How to remove files recursively
|
2012-01-05 19:54:52 +00:00
|
|
|
RMR = rm -fr
|
2011-07-17 12:49:43 +00:00
|
|
|
|
2011-07-18 15:55:23 +00:00
|
|
|
# How to stream edit a file
|
2012-01-05 19:54:52 +00:00
|
|
|
SED = sed
|
2011-07-18 15:55:23 +00:00
|
|
|
|
2011-07-12 18:11:15 +00:00
|
|
|
# How to copy the lisp files and elc files to their destination.
|
2012-01-05 19:54:52 +00:00
|
|
|
# CP = cp -p # try this if there is no install
|
|
|
|
CP = install -p
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-01-31 19:44:37 +00:00
|
|
|
# How to obtain administrative privileges
|
|
|
|
# SUDO = # leave blank if you don't need this
|
|
|
|
SUDO = sudo
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Name of the program to install info files
|
2012-01-05 19:54:52 +00:00
|
|
|
# INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
|
2011-07-12 18:11:15 +00:00
|
|
|
INSTALL_INFO = install-info
|
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
|
|
|
|
|
|
|
# How to generate org-install.el
|
|
|
|
MAKE_ORG_INSTALL = $(BATCH) \
|
|
|
|
--eval '(add-to-list '"'"'load-path ".")' \
|
|
|
|
--eval '(load "org-compat.el")' \
|
|
|
|
--eval '(load "../UTILITIES/org-fixup.el")' \
|
2012-04-30 04:49:23 +00:00
|
|
|
--eval '(org-make-org-install "$(CURDIR)/lisp/org-install.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 17:24:39 +00:00
|
|
|
|
|
|
|
# How to generate org-version.el
|
|
|
|
MAKE_ORG_VERSION = $(BATCH) \
|
|
|
|
--eval '(add-to-list '"'"'load-path ".")' \
|
|
|
|
--eval '(load "org-compat.el")' \
|
|
|
|
--eval '(load "../UTILITIES/org-fixup.el")' \
|
|
|
|
--eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "$(datadir)")'
|