* UTILITIES/org-fixup.el (org-make-local-mk): New function to create a
local.mk template from default.mk.
* UTILITIES/org-fixup.el (org-make-letterformat): New function to
replace the format string for A4 with one for Letter.
* default.mk: Few cosmetic changes to the template section. Add
definition MAKE_LOCAL_MK for call to org-make-local-mk. Remove
definition for SED, which is not used anymore. Implement MKDIR with
'install -d' by default. Since both CP and MKDIR are now
implemented with install, this reduces the number of external
dependencies. Add mode settings to both invocations of install to
keep the modes of installed files sane even if umask is set to a
strange value.
* targets.mk: Remove sed script and use $(MAKE_LOCAL_MK) instead.
* doc/Makefile: Remove sed script and replace with emacs script. This
script can not be placed into a variable since it would expand $<
and $@ in the context of the "card" target rather than the pattern
rule.
* UTILITIES/org-fixup.el(org-make-org-install): Use relative filenames
throughout, and query Emacs for directory names where a full path is
required. This avoids Cygwin/POSIX paths being misinterpreted by a
stock NTEmacs. Use the same regex as (org-reload) for enumerating
the files to byte-compile.
* default.mk: Factor out standard load-path for Emacs started in lisp/
into BATCHL and use this in defaults. Make all paths to be
interpreted by Emacs relative so Cygwin and NTEmacs can coexist.
* lisp/Makefile: remove stop targets, make autoloads depend on source
files again (not .PHONY). Keep autoload files around after compile,
but make sure to re-create them before installation and compile.
Remove autoload files before re-creating them to avoid errors from
Emacs when saving the buffer.
* targets.mk: remove stop targets and the mess that was necessary to
support them.
* default.mk: must use $(CURDIR) not $(PWD), $(PWD) is not well
defined when using sudo.
* 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.
* Makefile: new target "helpall" to document all targets, while "help"
continues to show a brief subset.
* default.mk: add cutlines for sed to produce local.mk with.
* targets.mk: add target "local.mk" to produce an (empty) local.mk
configuration template when it isn't already present. Ignore any
error when making this target since sed might not be present on all
systems. Redefine target "update" to not include testing, similarly
add target "update2" to additionally install without test. Add
targets "up0" to stop after git pull and "up1" to stop after test,
while "up2" continues to do everything and then installs. Complete
.PHONY target list. Add "refcard" target for compatibility with old
make. Clean contrib in "cleanall", too.
* doc/Makefile: read targets to make for "doc" from $(ORG_MAKE_DOC),
defaults to "info html pdf"; can be overridden by the user in
local.mk.
* targets.mk: read targets to make for "doc" and "docs" from
$(ORG_MAKE_DOC), defaults to "info html pdf"; can be overridden by
the user in local.mk.
* default.mk: document ORG_MAKE_DOC and provide a (commented) example
of how to have make only produce info documentation.
* default.mk: Run emacs without a site-file. BTEST_EXTRA
redefined to hold names of extra packages to require for
testing. BTEST_PRE and BTEST_POST allow additional
options to be injected around setup of standard load path
for testing. BTEST_OB_LANGUAGES holds the names of Babel
languages to required. R is not added to the list since
it requires ess to be installed and configured. All
variables can be overridden in local.mk as before.
default.mk: add $(testdir) definition based on $(TMPDIR), which
defaults to "/tmp" if not already defined
targets.mk(check): call test suite with TMPDIR=$(testdir) and remove
direactory after successful run of testsuite. Do not remove
temporary test files if $(TEST_NO_AUTOCLEAN) is set to a non-empty
value.
targets.mk(cleandirs): refactor the first part of what cleanall
had been doing.
targets.mk(cleanall): run cleantest and cleandirs, then remove
backup files.
targets.mk(cleanlisp): remove backup files.
targets.mk(cleandoc): remove backup files.
targets.mk(cleanall): run cleantest and cleandirs, then remove
backup files.
targets.mk(cleantest): removal of temporary test files.
defaults.mk: define SUDO to map to sudo, add comment to define
blank if administrative privileges are not needed (already root on
Linux or Administrator on Windows)
targets.mk: use newly defined $(SUDO) uinstead of plain sudo,
replaces some braces with parentheses
.gitignore: also ignore *.t2d directories in doc/ that texi2pdf
might produce when run in tidy mode
default.mk: correct some comments
targets.mk: implement missing clean targets and add aliases for
them
default.mk: make sure org-release is defined when starting emacs
in batch mode. Add a suffix to see if this definition leaks into
the installed version someplace. When running from an installed
version, this definition is pulled in from org-install.el.
Makefile: add help for target "test"
default.mk: more sane location for local data, add $(BTEST) that
will run the test in batch mode. Some tests require non-standard
packages, introduce $(BTEST_EXTRA) in order to add options so they
can be found.
targets.mk: new target "test" that implies "all" and then runs all
test. Hidden target "test-dirty" runs tests without doing
compilation.
Makefile: remove includes for maintainer targets, these will go
into local.mk on the server
default.mk: introduce $(datadir) to replace $(etcdir) in etc/Makefile
doc/Makefile: replace $etcdir) with $(datadir)
lisp/Makefile: record ODT styles location as defconst in org-install
{doc,etc,lisp}/Makefile: prefix all installation targets with $(DESTDIR)
* targets.mk: target "all" for lisp directory does now the same as
"compile", i.e. it cleans .elc file first
* Makefile: describe all targets and re-arrange the target groups
* Makefile, lisp/Makefile, doc/Makefile: add target clean-install
to remove files in install-directories
* default.mk: add customization variable $(SED)
* doc/Makefile: do not remove dir while cleaning
* lisp/Makefile: use sed instead of perl to weave git-status into
org.el and ignore any errors while doing it. Keep git status in
$(GITSTATUS) to make it more clear what happens in the check.
* Makefile: use info function for output and call shell only once
* default.mk: add PDFTEX and RMR variables for customization
* lisp/Makefile: add target 'all' and create $(lispdir) if necessary
* maint-targets.mk: invoke sub-make for HTML manuals
* maint.mk: remove unsused VARIABLES
* targets.mk: invoke sub-make for ./doc and clean up some targets
* Makefile: add an optional include local.mk
* default.mk: install lisp files into org subfolder by default
* lisp/Makefile: new file to handle all make targets within lisp
* lisp/dependencies.mk: dependencies, should rather be auto-generated
* maint.mk: remove obsolete variable definitions
* targets.mk: hand off to sub-make in ./lisp, remove unused targets
* Makefile: declare phony targets, remove help text for install-info-debian
* default.mk: add variable for FIND and RM
* targets.mk, maint-targets.mk: shuffle targets to where they belong, declare
phony targets, work around a texi2dvi bug, use pattern rules, use targets for
dependencies instead of repeating them verbatim
* default.mk: change prefix to /usr/share and do some formatting
This change establishes the baseline installation path that should work
out-of-the-box on Linux and Cygwin when the install is done system-wide (which
needs administrator privileges).
* Makefile: just keep help target (now also default for no target)
and include all other parts from here.
* default.mk: user editable variables with their default values
* maint.mk: definitions by maintainer, should not be touched by user
* targets.mk: user callable targets
* maint-targets.mk: targets for maintenance, should not be called by user
* dependencies.mk: keep order during compile (could become auto-generated)
This is the first in a series of patches that restructures the Makefile to
achieve easier customization and separation of different concerns (mainly user
vs. maintenance of the distribution). This first patch simply establishes a
set of files without changing anything else to provide a clean starting point.
It uses GNU make extensions since Makefile already depends on GNU make anyway.