X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fmake%2Fstepmake.make;h=1130415d69bdf696d5818568d5cb2ab3e835ffff;hb=a2441ac8c77d09651f4418bdb96bffea43066108;hp=3c7dade6d78e94a61627123c8d5a7d907b42a066;hpb=1d0c1b5899beabc7bc8a1f7b75a3387de08b9e92;p=lilypond.git diff --git a/stepmake/make/stepmake.make b/stepmake/make/stepmake.make index 3c7dade6d7..1130415d69 100644 --- a/stepmake/make/stepmake.make +++ b/stepmake/make/stepmake.make @@ -8,24 +8,56 @@ ifeq (0,${MAKELEVEL}) endif .SUFFIXES: +# Use alternate configurations alongside eachother: +# +# ./configure --enable-configsuffix=debug +# make conf=debug +# +# uses config-debug.make and config-debug.h; output goes to out-debug. +# +ifdef conf + CONFIGSUFFIX=-$(conf) +endif -ifndef config - configuration=config +# Use same configuration, but different output directory: +# +# make out=WWW +# +# uses config.make and config.h; output goes to out-WWW. +# +ifdef out + outbase=out-$(out) else - configuration=config-$(config) + outbase=out$(CONFIGSUFFIX) endif -include $(depth)/$(configuration).make +ifdef config + configuration=$(config) +else + ifeq ($(builddir),.) + configuration=$(depth)/config$(CONFIGSUFFIX).make + else + # user package + # configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make + # stepmake package + configuration=$(depth)/../$(builddir)/stepmake/config$(CONFIGSUFFIX).make + endif +endif -ifdef CONFIGSUFFIX -outdir=out-$(CONFIGSUFFIX) +include $(configuration) + +ifeq ($(builddir),.) + outroot=. else -outdir=out + outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd)) endif +outdir=$(outroot)/$(outbase) +config_h=$(depth)/$(builddir)/config$(CONFIGSUFFIX).h + # user package # stepdir = $(stepmake)/stepmake -# for stepmake packageg +# for stepmake package stepdir = $(depth)/stepmake STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES)