From 95f7c4722399964142aac1813c72f566d84d4d72 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 18 Sep 2009 11:03:38 +0200 Subject: Integrate documentation generation into the build system --- build/bootstrap.make | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) (limited to 'build') diff --git a/build/bootstrap.make b/build/bootstrap.make index 1c3d21e..1c38a72 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -9,7 +9,6 @@ include build-0.3/bootstrap.make # Configuration # - $(call include,$(scf_root)/configuration.make) @@ -17,38 +16,57 @@ $(call include,$(scf_root)/configuration.make) # ifdef %interactive% -.PHONY: test $(out_base)/.test \ - install $(out_base)/.install \ - clean $(out_base)/.clean +.PHONY: test $(out_base)/.test \ + install $(out_base)/.install \ + dist $(out_base)/.dist \ + dist-win $(out_base)/.dist-win \ + clean $(out_base)/.clean \ + cleandoc $(out_base)/.cleandoc test: $(out_base)/.test install: $(out_base)/.install +dist: $(out_base)/.dist +dist-win: $(out_base)/.dist-win clean: $(out_base)/.clean +cleandoc: $(out_base)/.cleandoc -ifeq ($(.DEFAULT_GOAL),test) +ifneq ($(filter $(.DEFAULT_GOAL),test install dist dist-win clean cleandoc),) .DEFAULT_GOAL := endif -ifeq ($(.DEFAULT_GOAL),install) -.DEFAULT_GOAL := endif -ifeq ($(.DEFAULT_GOAL),clean) -.DEFAULT_GOAL := -endif +# Make sure the distribution prefix is set if the goal is dist or dist-win. +# +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +ifeq ($(dist_prefix),) +$(error dist_prefix is not set) +endif endif -# Don't include dependency info if we are cleaning. +# Don't include dependency info for certain targets. # define include-dep -endef - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),disfigure) -define include-dep $(call -include,$1) endef + +ifneq ($(filter $(MAKECMDGOALS),clean cleandoc disfigure),) +include-dep = endif + + +# For dist, don't include dependecies in examples, and tests. +# +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) + +ifneq ($(subst $(src_root)/tests/,,$(src_base)),$(src_base)) +include-dep = +endif + +ifneq ($(subst $(src_root)/examples/,,$(src_base)),$(src_base)) +include-dep = +endif + endif -- cgit v1.1