diff options
Diffstat (limited to 'build/bootstrap.make')
-rw-r--r-- | build/bootstrap.make | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make index ad55b12..afd4e4e 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -19,36 +19,59 @@ ifdef %interactive% .PHONY: test $(out_base)/.test \ install $(out_base)/.install \ - clean $(out_base)/.clean + 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 libxsde, examples, and tests. +# +ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) + +ifneq ($(subst $(src_root)/libxsde/,,$(src_base)),$(src_base)) +include-dep = +endif + +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 |