From 0a9c29d30518222f455b72ef6955ec02b8a4814d Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 22 Apr 2012 08:22:31 +0200 Subject: [PATCH] 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. --- default.mk | 6 ++++++ doc/Makefile | 2 +- targets.mk | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/default.mk b/default.mk index 45e6fbfa7..ea56d7246 100644 --- a/default.mk +++ b/default.mk @@ -4,6 +4,9 @@ ## CHECK AND ADAPT THE FOLLOWING DEFINITIONS ##---------------------------------------------------------------------- +# Override default target if desired or define your own default target +# oldorg: # have plain "make" do the same things the old Makefile did + # Name of your emacs binary EMACS = emacs @@ -19,6 +22,9 @@ datadir = $(prefix)/emacs/etc/org # Where info files go. infodir = $(prefix)/info +# Define if you only need info documentation, the default includes html and pdf +# ORG_MAKE_DOC = info # html pdf + # Where to create temporary files for the testsuite TMPDIR ?= /tmp testdir = $(TMPDIR)/tmp-orgtest diff --git a/doc/Makefile b/doc/Makefile index 74fa4d54e..95e702423 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -6,7 +6,7 @@ endif clean cleanall clean-install \ org-version.inc -all: info html pdf card +all: $(ORG_MAKE_DOC) info: org diff --git a/targets.mk b/targets.mk index 394e55e89..a34130188 100644 --- a/targets.mk +++ b/targets.mk @@ -6,6 +6,7 @@ DISTFILES_extra= Makefile request-assign-future.txt contrib etc LISPDIRS = lisp SUBDIRS = doc etc $(LISPDIRS) INSTSUB = $(SUBDIRS:%=install-%) +ORG_MAKE_DOC ?= info html pdf ifneq ($(wildcard .git),) GITVERSION ?= $(shell git describe --abbrev=6 HEAD) @@ -62,7 +63,7 @@ install: $(INSTSUB) install-info: install-doc -doc docs: info html pdf card +doc docs: $(ORG_MAKE_DOC) info html pdf card: $(MAKE) -C doc $@