Commit Graph

20 Commits

Author SHA1 Message Date
Achim Gratz 372948a88f use only relative paths for better compatibility with mixed Cygwin/NTEmacs installations
* 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.
2012-05-21 15:34:25 +02:00
Achim Gratz b567341443 clean up Makefile some more, keep autoloads around
* 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.
2012-05-18 07:45:45 +02:00
Achim Gratz df89e3cd0c 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-05-18 07:45:44 +02:00
Achim Gratz 687766c922 Introduce compatibility and convenience targets, local.mk template, add "helpall"
* 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.
2012-04-23 21:42:08 +02:00
Achim Gratz 0a9c29d305 allow customization of the "doc" target to skip certain types of documentation
* 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.
2012-04-22 10:51:29 +02:00
Achim Gratz b33a4d6be0 move testing configuration into user-defined part, add hints
* default.mk: move testing configuration $(BTEST_*) into
       user-defined part, add hints on what should go there. Some
       cosmetic fixes.
2012-04-20 21:04:14 +02:00
Achim Gratz 72d7c95469 initialize Babel languages and provide possibility to load extra packages for testing
* 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.
2012-04-20 21:04:13 +02:00
Achim Gratz 3bbd458780 add cleaning of temporary test files (with option to keep them)
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.
2012-04-20 21:04:13 +02:00
Achim Gratz 353a0c519b introduce $(SUDO) to make install with administrative privileges customizable
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
2012-04-20 21:04:12 +02:00
Achim Gratz 41624c1809 ignore *.t2d directories in doc/, adapt some comments, implement missing targets
.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
2012-04-20 21:04:12 +02:00
Achim Gratz b9c72bebe4 make sure org-release is defined in batch mode
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.
2012-04-20 21:04:12 +02:00
Achim Gratz 4a7ed95010 introduce new make target "test"
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.
2012-04-20 21:04:12 +02:00
Achim Gratz 6a3ec67abd Introduce $(datadir), prefix all installation paths with $(DESTDIR)
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)
2012-04-20 21:04:11 +02:00
Achim Gratz 1e343f7f3b update target descriptions, target "all" now automatically cleans .elc before compilation
* 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
2012-04-20 21:04:10 +02:00
Achim Gratz 501f9b1741 use sed instead of perl, add target clean-install
* 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.
2012-04-20 21:04:08 +02:00
Achim Gratz a5cb04dcd8 hand off ./doc to sub-make
* 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
2012-04-20 21:04:07 +02:00
Achim Gratz ac3162b4f0 activate local.mk and hand off ./lisp to a sub-make
* 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
2012-04-20 21:04:07 +02:00
Achim Gratz 77f0e50787 shuffle targets to their correct place, harden recipes
* 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
2012-04-20 21:04:07 +02:00
Achim Gratz 2386380c72 change defaults to something that should work on most Linux systems and Cygwin
* 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).
2012-04-20 21:04:07 +02:00
Achim Gratz b0ebd4365e Split off Makefile into several parts, included from master Makefile
* 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.
2012-04-20 21:04:07 +02:00