diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/bootstrap.make | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make index 43723fd..046e3eb 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -16,10 +16,17 @@ ifeq ($(patsubst %build/bootstrap.make,,$(lastword $(MAKEFILE_LIST))),) include $(build)/bootstrap.make endif -# Configuration +def_goal := $(.DEFAULT_GOAL) + +# Configuration. # $(call include,$(scf_root)/configuration.make) +# Include C++ configuration. We need to know if we are using the generic +# C++ compiler in which case we need to compensate for missing dependency +# auto-generation (see below). +# +$(call include,$(bld_root)/cxx/configuration.make) # Aliases # @@ -41,10 +48,6 @@ dist: $(out_base)/.dist dist-win: $(out_base)/.dist-win clean: $(out_base)/.clean -ifneq ($(filter $(.DEFAULT_GOAL),test install dist dist-win clean),) -.DEFAULT_GOAL := -endif - endif @@ -56,21 +59,36 @@ $(error dist_prefix is not set) endif endif - -# Don't include dependency info for certain targets. +# If we don't have dependency auto-generation then we need to manually +# make sure that generated files are generated before C++ file are +# compiler. To do this we make the object files ($2) depend in order- +# only on generated files ($3). # +ifeq ($(cxx_id),generic) + +define include-dep +$(if $2,$(eval $2: | $3)) +endef + +else + define include-dep $(call -include,$1) endef +endif + +# Don't include dependency info for certain targets. +# ifneq ($(filter $(MAKECMDGOALS),clean disfigure),) include-dep = endif -# For dist, don't include dependecies in libxsde, examples, and tests. +# For dist and install, don't include dependencies in libxsde, examples, +# and tests since we might be cross-compiling. # -ifneq ($(filter $(MAKECMDGOALS),dist dist-win),) +ifneq ($(filter $(MAKECMDGOALS),dist dist-win install),) ifneq ($(subst $(src_root)/libxsde/,,$(src_base)),$(src_base)) include-dep = @@ -85,3 +103,5 @@ include-dep = endif endif + +.DEFAULT_GOAL := $(def_goal) |