X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=make%2Fstepmake.make;h=9b1767fa06a5b082add1e2160f149164a683276a;hb=48f5c875aaff3eae7d4220671310f93397d1e83b;hp=d92fd1ff662b3871ed19f2596c392bdd65c1b9c3;hpb=3abcf40ffcc86fa452df2d3e79cc2c27b60fc6bd;p=lilypond.git diff --git a/make/stepmake.make b/make/stepmake.make index d92fd1ff66..9b1767fa06 100644 --- a/make/stepmake.make +++ b/make/stepmake.make @@ -1,7 +1,42 @@ # make/Stepmake.make -include $(depth)/make/toplevel-version.make +# If usescons=something then reroute to scons if user is using that. +ifdef usescons + +SCONS_USER = $(wildcard $(depth)/.sconsign) +ifeq ($(SCONS_USER),) +SCONS_USER = $(wildcard $(depth)/.sconf_temp) +endif +ifneq ($(SCONS_USER),) + +ifeq ($(strip $(depth)),..) +here = $(notdir $(CURDIR)) +else +ifeq ($(strip $(depth)),../..) +# ZUCHT? +# here = $(notdir $(dir $(CURDIR)))/$(notdir $(CURDIR)) +here = $(shell basename $$(dirname $(CURDIR)))/$(notdir $(CURDIR)) +endif +endif + +MAKE_TARGETS = config deb diff dist distclean doc release po \ +po-replace po-update all clean check default exe help install lib web \ +web-install web-clean TAGS +$(MAKE_TARGETS): scons + +# To make this trickery complete, we could have ./configure remove +# traces of scons configuration. +scons: + @echo "warning: $(SCONS_USER) detected, rerouting to scons" + cd $(depth) && scons $(here) $(MAKECMDGOALS) + false +endif +endif + +include $(depth)/make/toplevel-version.make +MICRO_VERSION=$(PATCH_LEVEL) +BUILD_VERSION=1 # Use alternate configurations alongside eachother: # @@ -27,28 +62,27 @@ else endif ifdef config - configuration=$(config) + config_make=$(config) else - ifeq ($(builddir),.) - configuration=$(depth)/config$(CONFIGSUFFIX).make + ifeq ($(builddir),) + config_make=$(depth)/config$(CONFIGSUFFIX).make else - # user package - configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make - # stepmake package - #configuration=$(depth)/../$(builddir)/stepmake/config$(CONFIGSUFFIX).make + config_make=$(builddir)/config$(CONFIGSUFFIX).make endif endif -include $(configuration) - -ifeq ($(builddir),.) - outroot=$(builddir) +ifeq ($(builddir),) + outroot=. else - outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd)) + outroot=$(builddir)$(patsubst $(shell cd $(depth); pwd)%,%,$(pwd)) endif +include $(config_make) + outdir=$(outroot)/$(outbase) -config_h=$(depth)/$(builddir)/config$(CONFIGSUFFIX).h + +# why not generic ?? +config_h=$(builddir)/config$(CONFIGSUFFIX).hh # The outdir that was configured for: best guess to find binaries outconfbase=out$(CONFIGSUFFIX)