aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-09-18 11:03:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-09-18 11:03:38 +0200
commit95f7c4722399964142aac1813c72f566d84d4d72 (patch)
tree36172642e634ab67fc94faf99c7d89df3a6b92e5 /build
parentc34af468acc94691d0a5954eae38a89506bc620e (diff)
Integrate documentation generation into the build system
Diffstat (limited to 'build')
-rw-r--r--build/bootstrap.make50
1 files changed, 34 insertions, 16 deletions
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